Documentation ¶
Index ¶
- Variables
- func Debug(msg ...string)
- func Debugf(format string, args ...interface{})
- func Error(msg ...string)
- func Errorf(format string, args ...interface{})
- func Info(msg ...string)
- func Infof(format string, args ...interface{})
- func SetLogger(l *Logger)
- func Warning(msg ...string)
- func Warningf(format string, args ...interface{})
- type LogFormat
- type LogLevel
- type LogOption
- type Logger
- func (l *Logger) Debug(msg ...string)
- func (l *Logger) Debugf(format string, args ...interface{})
- func (l *Logger) Error(msg ...string)
- func (l *Logger) Errorf(format string, args ...interface{})
- func (l *Logger) Fatal(msg ...string)
- func (l *Logger) Fatalf(format string, args ...interface{})
- func (l *Logger) Info(msg ...string)
- func (l *Logger) Infof(format string, args ...interface{})
- func (l *Logger) Warning(msg ...string)
- func (l *Logger) Warningf(format string, args ...interface{})
- type LoggerConfig
- type Option
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultLogFileConfig = &lumberjack.Logger{ Filename: filepath.Join(basePath, logFileName), MaxSize: 10, MaxBackups: 5, MaxAge: 28, LocalTime: true, } )
Functions ¶
Types ¶
type LoggerConfig ¶
type LoggerConfig struct {
// contains filtered or unexported fields
}
func NewConfig ¶
func NewConfig() *LoggerConfig
func (*LoggerConfig) Build ¶
func (l *LoggerConfig) Build() *Logger
func (*LoggerConfig) Format ¶
func (l *LoggerConfig) Format(format LogFormat) *LoggerConfig
func (*LoggerConfig) Level ¶
func (l *LoggerConfig) Level(level LogLevel) *LoggerConfig
func (*LoggerConfig) Rotate ¶
func (l *LoggerConfig) Rotate(opts ...Option) *LoggerConfig
type Option ¶
type Option func(*LoggerConfig)
Click to show internal directories.
Click to hide internal directories.