Documentation ¶
Index ¶
- Variables
- type ConsoleLogger
- func (c ConsoleLogger) Debug(format string, a ...interface{})
- func (c ConsoleLogger) Error(format string, a ...interface{})
- func (c ConsoleLogger) Fatal(format string, a ...interface{})
- func (c ConsoleLogger) Info(format string, a ...interface{})
- func (c ConsoleLogger) Warning(format string, a ...interface{})
- type FileLogger
- func (f *FileLogger) Close()
- func (f *FileLogger) Debug(format string, a ...interface{})
- func (f *FileLogger) Error(format string, a ...interface{})
- func (f *FileLogger) Fatal(format string, a ...interface{})
- func (f *FileLogger) Info(format string, a ...interface{})
- func (f *FileLogger) Warning(format string, a ...interface{})
- type LogLevel
- type Logger
Constants ¶
This section is empty.
Variables ¶
View Source
var (
// MaxSize 日志通道缓冲区大小
MaxSize = 50000
)
Functions ¶
This section is empty.
Types ¶
type ConsoleLogger ¶
type ConsoleLogger struct {
Level LogLevel
}
ConsoleLogger 日志结构体
func (ConsoleLogger) Debug ¶
func (c ConsoleLogger) Debug(format string, a ...interface{})
func (ConsoleLogger) Error ¶
func (c ConsoleLogger) Error(format string, a ...interface{})
func (ConsoleLogger) Fatal ¶
func (c ConsoleLogger) Fatal(format string, a ...interface{})
func (ConsoleLogger) Info ¶
func (c ConsoleLogger) Info(format string, a ...interface{})
func (ConsoleLogger) Warning ¶
func (c ConsoleLogger) Warning(format string, a ...interface{})
type FileLogger ¶
type FileLogger struct { Level LogLevel // contains filtered or unexported fields }
FileLogger 文件日志结构体
func NewFileLogger ¶
func NewFileLogger(levelStr, fp, fn string, maxSize int64) *FileLogger
NewFileLogger 构造函数
func (*FileLogger) Warning ¶
func (f *FileLogger) Warning(format string, a ...interface{})
Warning ...
Click to show internal directories.
Click to hide internal directories.