Documentation
¶
Index ¶
- Constants
- func Debug(format string, args ...interface{})
- func Error(format string, args ...interface{})
- func Fatal(format string, args ...interface{})
- func GetLineInfo() (fileName string, funcName string, lineNum int)
- func Info(format string, args ...interface{})
- func InitLogger(name string, config map[string]string) (err error)
- func PathExists(path string) (bool, error)
- func Trace(format string, args ...interface{})
- func Warn(format string, args ...interface{})
- type ConsoleLogger
- func (c *ConsoleLogger) Close()
- func (c *ConsoleLogger) Debug(format string, args ...interface{})
- func (c *ConsoleLogger) Error(format string, args ...interface{})
- func (c *ConsoleLogger) Fatal(format string, args ...interface{})
- func (c *ConsoleLogger) GetLevel() int
- func (c *ConsoleLogger) Info(format string, args ...interface{})
- func (c *ConsoleLogger) Init()
- func (c *ConsoleLogger) SetLevel(level int)
- func (c *ConsoleLogger) Trace(format string, args ...interface{})
- func (c *ConsoleLogger) Warn(format string, args ...interface{})
- type FileLogger
- func (f *FileLogger) Close()
- func (f *FileLogger) Debug(format string, args ...interface{})
- func (f *FileLogger) Error(format string, args ...interface{})
- func (f *FileLogger) Fatal(format string, args ...interface{})
- func (f *FileLogger) GetLevel() int
- func (f *FileLogger) Info(format string, args ...interface{})
- func (f *FileLogger) Init()
- func (f *FileLogger) SetLevel(level int)
- func (f *FileLogger) Trace(format string, args ...interface{})
- func (f *FileLogger) Warn(format string, args ...interface{})
- type LogData
- type Logger
Constants ¶
View Source
const ( LogLevelDebug = iota LogLevelTrace LogLevelInfo LogLevelWarn LogLevelError LogLevelFatal )
View Source
const ( LogRotateTypeHour = iota LogRotateTypeSize )
Variables ¶
This section is empty.
Functions ¶
func GetLineInfo ¶
func PathExists ¶ added in v1.0.2
Types ¶
type ConsoleLogger ¶
type ConsoleLogger struct {
// contains filtered or unexported fields
}
func (*ConsoleLogger) Close ¶
func (c *ConsoleLogger) Close()
func (*ConsoleLogger) Debug ¶
func (c *ConsoleLogger) Debug(format string, args ...interface{})
func (*ConsoleLogger) Error ¶
func (c *ConsoleLogger) Error(format string, args ...interface{})
func (*ConsoleLogger) Fatal ¶
func (c *ConsoleLogger) Fatal(format string, args ...interface{})
func (*ConsoleLogger) GetLevel ¶
func (c *ConsoleLogger) GetLevel() int
func (*ConsoleLogger) Info ¶
func (c *ConsoleLogger) Info(format string, args ...interface{})
func (*ConsoleLogger) Init ¶
func (c *ConsoleLogger) Init()
func (*ConsoleLogger) SetLevel ¶
func (c *ConsoleLogger) SetLevel(level int)
func (*ConsoleLogger) Trace ¶
func (c *ConsoleLogger) Trace(format string, args ...interface{})
func (*ConsoleLogger) Warn ¶
func (c *ConsoleLogger) Warn(format string, args ...interface{})
type FileLogger ¶
type FileLogger struct {
// contains filtered or unexported fields
}
func (*FileLogger) Close ¶
func (f *FileLogger) Close()
func (*FileLogger) Debug ¶
func (f *FileLogger) Debug(format string, args ...interface{})
func (*FileLogger) Error ¶
func (f *FileLogger) Error(format string, args ...interface{})
func (*FileLogger) Fatal ¶
func (f *FileLogger) Fatal(format string, args ...interface{})
func (*FileLogger) GetLevel ¶
func (f *FileLogger) GetLevel() int
func (*FileLogger) Info ¶
func (f *FileLogger) Info(format string, args ...interface{})
func (*FileLogger) Init ¶
func (f *FileLogger) Init()
func (*FileLogger) SetLevel ¶
func (f *FileLogger) SetLevel(level int)
func (*FileLogger) Trace ¶
func (f *FileLogger) Trace(format string, args ...interface{})
func (*FileLogger) Warn ¶
func (f *FileLogger) Warn(format string, args ...interface{})
type Logger ¶
type Logger interface { SetLevel(level int) GetLevel() int Init() Debug(format string, args ...interface{}) Trace(format string, args ...interface{}) Info(format string, args ...interface{}) Warn(format string, args ...interface{}) Error(format string, args ...interface{}) Fatal(format string, args ...interface{}) Close() }
Click to show internal directories.
Click to hide internal directories.