Documentation ¶
Index ¶
- func Debug(msg string, fields ...zap.Field)
- func DebugF(args ...interface{})
- func Error(msg string, fields ...zap.Field)
- func ErrorF(args ...interface{})
- func Fatal(msg string, fields ...zap.Field)
- func FatalF(args ...interface{})
- func Info(msg string, fields ...zap.Field)
- func InfoF(args ...interface{})
- func NewDefaultLogger()
- func NewDefaultLoggerWithConfig(logConfig LoggerConfig)
- func Panic(msg string, fields ...zap.Field)
- func PanicF(args ...interface{})
- func Warn(msg string, fields ...zap.Field)
- func WarnF(args ...interface{})
- type Logger
- func (l *Logger) CloneLogger(name string) *Logger
- func (l *Logger) Debug(msg string, fields ...zap.Field)
- func (l *Logger) DebugF(args ...interface{})
- func (l *Logger) Error(msg string, fields ...zap.Field)
- func (l *Logger) ErrorF(args ...interface{})
- func (l *Logger) Fatal(msg string, fields ...zap.Field)
- func (l *Logger) FatalF(args ...interface{})
- func (l *Logger) Info(msg string, fields ...zap.Field)
- func (l *Logger) InfoF(args ...interface{})
- func (l *Logger) Panic(msg string, fields ...zap.Field)
- func (l *Logger) PanicF(args ...interface{})
- func (l *Logger) Warn(msg string, fields ...zap.Field)
- func (l *Logger) WarnF(args ...interface{})
- type LoggerConfig
- func (l *LoggerConfig) FilenameOption(filename string) Option
- func (l *LoggerConfig) IsConsoleOption(isConsole bool) Option
- func (l *LoggerConfig) IsFileNumOption(isFileNum bool) Option
- func (l *LoggerConfig) LevelOption(level zapcore.Level) Option
- func (l *LoggerConfig) PathNameOption(pathName string) Option
- func (l *LoggerConfig) WithOptions(opts ...Option)
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDefaultLogger ¶
func NewDefaultLogger()
func NewDefaultLoggerWithConfig ¶
func NewDefaultLoggerWithConfig(logConfig LoggerConfig)
Types ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
func CloneDefaultLog ¶
func GetDefaultLog ¶
func GetDefaultLog() *Logger
func NewLogger ¶
func NewLogger(logConfig LoggerConfig) *Logger
func (*Logger) CloneLogger ¶
type LoggerConfig ¶
type LoggerConfig struct { Level zapcore.Level `json:"level" toml:"level"` PathName string `json:"pathName" toml:"pathName" ` Filename string `json:"filename" toml:"filename"` IsConsole bool `json:"isConsole" toml:"isConsole"` IsFileNum bool `json:"isFileNum" toml:"isFileNum"` Logs map[string]int `json:"logs" toml:"logs"` }
func NewDefaultLoggerConfig ¶
func NewDefaultLoggerConfig() LoggerConfig
func (*LoggerConfig) FilenameOption ¶
func (l *LoggerConfig) FilenameOption(filename string) Option
func (*LoggerConfig) IsConsoleOption ¶
func (l *LoggerConfig) IsConsoleOption(isConsole bool) Option
func (*LoggerConfig) IsFileNumOption ¶
func (l *LoggerConfig) IsFileNumOption(isFileNum bool) Option
func (*LoggerConfig) LevelOption ¶
func (l *LoggerConfig) LevelOption(level zapcore.Level) Option
func (*LoggerConfig) PathNameOption ¶
func (l *LoggerConfig) PathNameOption(pathName string) Option
func (*LoggerConfig) WithOptions ¶
func (l *LoggerConfig) WithOptions(opts ...Option)
Click to show internal directories.
Click to hide internal directories.