Documentation ¶
Index ¶
- Constants
- Variables
- func Close()
- func Debug(args ...interface{})
- func DebugExtF(ext interface{}, fmt string, args ...interface{})
- func DebugF(fmt string, args ...interface{})
- func Error(args ...interface{})
- func ErrorExtF(ext interface{}, fmt string, args ...interface{})
- func ErrorF(fmt string, args ...interface{})
- func Fatal(args ...interface{})
- func FatalExtF(ext interface{}, fmt string, args ...interface{})
- func FatalF(fmt string, args ...interface{})
- func Info(args ...interface{})
- func InfoExtF(ext interface{}, fmt string, args ...interface{})
- func InfoF(fmt string, args ...interface{})
- func InfoFNL(fmt string, args ...interface{})
- func NeverShowF(ext interface{}, fmt string, args ...interface{})
- func Register(w Writer)
- func SetLayout(layout string)
- func SetLevel(lvl int)
- func SetupLogWithConf(file string) (err error)
- func Warn(args ...interface{})
- func WarnExtF(ext interface{}, fmt string, args ...interface{})
- func WarnF(fmt string, args ...interface{})
- type ConfConsoleWriter
- type ConfFileWriter
- type ConsoleWriter
- type FileWriter
- type Flusher
- type LogConfig
- type Logger
- func (l *Logger) Close()
- func (l *Logger) DebugF(fmt string, args ...interface{})
- func (l *Logger) ErrorF(fmt string, args ...interface{})
- func (l *Logger) FatalF(fmt string, args ...interface{})
- func (l *Logger) InfoF(fmt string, args ...interface{})
- func (l *Logger) InfoFNL(fmt string, args ...interface{})
- func (l *Logger) Register(w Writer)
- func (l *Logger) SetLayout(layout string)
- func (l *Logger) SetLevel(lvl int)
- func (l *Logger) WarnF(fmt string, args ...interface{})
- type LoggerCallbackFunc
- type Record
- type Rotater
- type Writer
Constants ¶
View Source
const ( DEBUG = iota INFO NEVERShow WARNING ERROR FATAL )
Variables ¶
View Source
var (
LEVEL_FLAGS = [...]string{"DEBUG", "INFO", "NEVERShow", "WARN", "ERROR", "FATAL"}
)
Functions ¶
func NeverShowF ¶
func NeverShowF(ext interface{}, fmt string, args ...interface{})
func SetupLogWithConf ¶
Types ¶
type ConfConsoleWriter ¶
type ConfFileWriter ¶
type ConsoleWriter ¶
type ConsoleWriter struct {
// contains filtered or unexported fields
}
func NewConsoleWriter ¶
func NewConsoleWriter() *ConsoleWriter
func (*ConsoleWriter) Init ¶
func (w *ConsoleWriter) Init() error
func (*ConsoleWriter) SetColor ¶
func (w *ConsoleWriter) SetColor(c bool)
func (*ConsoleWriter) Write ¶
func (w *ConsoleWriter) Write(r *Record) error
type FileWriter ¶
type FileWriter struct {
// contains filtered or unexported fields
}
func NewFileWriter ¶
func NewFileWriter() *FileWriter
func (*FileWriter) Flush ¶
func (w *FileWriter) Flush() error
func (*FileWriter) Init ¶
func (w *FileWriter) Init() error
func (*FileWriter) Rotate ¶
func (w *FileWriter) Rotate() error
func (*FileWriter) SetPathPattern ¶
func (w *FileWriter) SetPathPattern(pattern string) error
func (*FileWriter) Write ¶
func (w *FileWriter) Write(r *Record) error
type LogConfig ¶
type LogConfig struct { Level string `json:"LogLevel"` FW ConfFileWriter `json:"FileWriter"` CW ConfConsoleWriter `json:"ConsoleWriter"` Layout string `json:"Layout"` }
type LoggerCallbackFunc ¶
type LoggerCallbackFunc func(record Record)
Click to show internal directories.
Click to hide internal directories.