Documentation ¶
Index ¶
- func Debug(msg string, fields map[string]interface{})
- func Error(msg string, fields map[string]interface{})
- func Fatal(msg string, fields map[string]interface{})
- func Info(msg string, fields map[string]interface{})
- func MustSetUp(options ...Option)
- func SetLogLevel(level string)
- func SetLogger(logger Logger)
- func SetOutPutPath(path string) (err error)
- func Warning(msg string, fields map[string]interface{})
- type ConfigOptions
- type Logger
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetLogLevel ¶
func SetLogLevel(level string)
func SetOutPutPath ¶
Types ¶
type ConfigOptions ¶
type ConfigOptions struct { OutputPath string MaxFileSizeMB int MaxBackups int MaxAges int Compress bool LocalTime bool }
func (*ConfigOptions) Logger ¶
func (c *ConfigOptions) Logger() *lumberjack.Logger
type Logger ¶
type Logger interface { Debug(msg string, fields map[string]interface{}) Info(msg string, fields map[string]interface{}) Warning(msg string, fields map[string]interface{}) Error(msg string, fields map[string]interface{}) Fatal(msg string, fields map[string]interface{}) Level(level string) OutputPath(path string) (err error) }
type Option ¶
type Option func(*ConfigOptions)
func WithCompress ¶
func WithLocalTime ¶
func WithMaxAges ¶
func WithMaxBackups ¶
func WithMaxFileSizeMB ¶
func WithOutPutPath ¶
Click to show internal directories.
Click to hide internal directories.