Versions in this module Expand all Collapse all v0 v0.9.0 Sep 5, 2024 Changes in this version + const DefaultRotatePeriodSecond + const FormatEnumConsole + const FormatEnumJSON + var LevelEnumDebug = zap.NewAtomicLevelAt(zapcore.DebugLevel) + var LevelEnumInfo = zap.NewAtomicLevelAt(zapcore.InfoLevel) + func Any(key string, value interface{}) zap.Field + func ByteString(key string, val []byte) zap.Field + func Debug(msg string, fields ...zap.Field) + func Error(msg string, fields ...zap.Field) + func ErrorField(err error) zap.Field + func Fatal(msg string, fields ...zap.Field) + func Info(msg string, fields ...zap.Field) + func InfoField(v interface{}) zap.Field + func NewLog(config *LogConfig) *zap.Logger + func RotatePeriod(l *lumberjack.Logger, periodSecond int64) + func SetGlobalLog(appName string, prod bool, opts ...OptionFunc) + func String(key string, value string) zap.Field + func Warn(msg string, fields ...zap.Field) + func ZapToLogrusLevel(zapLevel zapcore.Level) logrus.Level + type FormatEnum string + type FormatTime = zapcore.TimeEncoder + type LevelEnum = zap.AtomicLevel + type LogConfig struct + Hooks []LogHook + func DefaultLogConfig() *LogConfig + func ProdLogConfig(appName string) *LogConfig + type LogHook interface + DoHook func(zapcore.Entry) error + type LogrusToZapHook struct + func NewLogrusToZapHook(zapLogger *zap.Logger) *LogrusToZapHook + func (h *LogrusToZapHook) Fire(entry *logrus.Entry) error + func (h *LogrusToZapHook) Levels() []logrus.Level + type OptionFunc func(*LogConfig) + func WithAppNameOption(v string) OptionFunc + func WithDirOption(v string) OptionFunc + func WithFormatOption(v FormatEnum) OptionFunc + func WithHooksOption(hooks ...LogHook) OptionFunc + func WithLevelOption(v LevelEnum) OptionFunc + func WithLocalTimeOption(v bool) OptionFunc + func WithMaxBackupsOption(v int) OptionFunc + func WithMaxSizeOption(v int) OptionFunc + func WithMultiWriteOption(v bool) OptionFunc + func WithRotatePeriodSecondOption(v int64) OptionFunc