Documentation ¶
Index ¶
- Constants
- Variables
- func Any(key string, value any) zap.Field
- func Bool(key string, v bool) zap.Field
- func Close()
- func Debug(msg string, args ...zap.Field)
- func Dump(dump string, args ...zap.Field)
- func Duration(key string, v time.Duration) zap.Field
- func Error(msg string, args ...zap.Field)
- func ErrorAttr(key string, value error) zap.Field
- func Fatal(msg string, args ...zap.Field)
- func Float64(key string, v float64) zap.Field
- func Info(msg string, args ...zap.Field)
- func Int(key string, value int) zap.Field
- func Int16(key string, value int16) zap.Field
- func Int32(key string, value int32) zap.Field
- func Int64(key string, value int64) zap.Field
- func Int8(key string, value int8) zap.Field
- func SetHookDefer(f func(entry zapcore.Entry) error)
- func SetLogger(logger ILogger)
- func Stack(msg string, args string)
- func String(key, value string) zap.Field
- func Time(key string, v time.Time) zap.Field
- func Uint(key string, value uint) zap.Field
- func Uint16(key string, value uint16) zap.Field
- func Uint32(key string, value uint32) zap.Field
- func Uint64(key string, v uint64) zap.Field
- func Uint8(key string, value uint8) zap.Field
- func Warning(msg string, args ...zap.Field)
- type ILogger
- type Logger
- func (logger *Logger) Close()
- func (logger *Logger) Debug(msg string, args ...zap.Field)
- func (logger *Logger) Dump(msg string, args ...zap.Field)
- func (logger *Logger) Error(msg string, args ...zap.Field)
- func (logger *Logger) Fatal(msg string, args ...zap.Field)
- func (logger *Logger) Info(msg string, args ...zap.Field)
- func (logger *Logger) SetHook(f func(entry zapcore.Entry) error)
- func (logger *Logger) Warning(msg string, args ...zap.Field)
Constants ¶
View Source
const ( LevelDebug = zap.DebugLevel LevelInfo = zap.InfoLevel LevelWarning = zap.WarnLevel LevelError = zap.ErrorLevel LevelStack = zap.DPanicLevel LevelDump = zap.PanicLevel LevelFatal = zap.FatalLevel )
levels
Variables ¶
View Source
var ( OutputType = "all" LogPath = "./log" LogSize = 100 LogLevel = LevelDebug Encoder = "console" )
Functions ¶
func SetHookDefer ¶
SetHookDefer 设置日志defer hook 需要在node.Start()之前设置
Types ¶
type ILogger ¶
Click to show internal directories.
Click to hide internal directories.