Documentation
¶
Index ¶
Constants ¶
View Source
const ( // TypeZsskyLog - use zssky log TypeZsskyLog = "zssky" // TypeLogrus - use logrus TypeLogrus = "logrus" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
Level Level `json:"level"`
FilePath string `json:"file_path"`
HighLighting bool `json:"highlighting"`
RotateByDay bool `json:"rotate_by_day"`
RotateByHour bool `json:"rotate_by_hour"`
JSONFormatter bool `json:"json_formatter"`
CallerSkip int `json:"caller_skip"`
// Extend fields
// Extended fields can be used if there is a special implementation
Extend1 string `json:"extend_1"`
Extend2 string `json:"extend_2"`
}
Config - log base config
type Logger ¶
type Logger interface {
// Infof - info format log
Infof(format string, v ...interface{})
// Info - info format log
Info(v ...interface{})
// Debugf - debug format log
Debugf(format string, v ...interface{})
// Debug - debug format log
Debug(v ...interface{})
// Warnf - warn format log
Warnf(format string, v ...interface{})
// Warn - warn log
Warn(v ...interface{})
// Warningf - Warning format log
Warningf(format string, v ...interface{})
// Warning - Warning log
Warning(v ...interface{})
// Errorf - error format log
Errorf(format string, v ...interface{})
// Error - error format log
Error(v ...interface{})
// Fatalf - fatal format log
Fatalf(format string, v ...interface{})
// Fatal - fatal format log
Fatal(v ...interface{})
// Fatalln - fatal log
Fatalln(v ...interface{})
// Printf - printf format value
Printf(format string, v ...interface{})
// Print - printf value
Print(v ...interface{})
// Println - print value
Println(v ...interface{})
// Panic - panic
Panic(v ...interface{})
// Panicf - panic format value
Panicf(format string, v ...interface{})
// Panicln - panic
Panicln(v ...interface{})
// close connection
Close() error
// start gc routine based on config settings.
StartAndGC(config Config) error
}
Logger interface contains all behaviors for log adapter.
Click to show internal directories.
Click to hide internal directories.