Documentation ¶
Index ¶
- Variables
- func Init(verbose bool, formatter zapcore.Encoder, ...) (*zap.SugaredLogger, error)
- func New(parent *zap.SugaredLogger, moduleName string, options ...zap.Option) *zap.SugaredLogger
- func NewOtherLogger(formatter zapcore.Encoder, moduleName, logFilename, logDir string, ...) (logger *zap.SugaredLogger, closer func() error, err error)
- func NewOtherLoggerWithOption(formatter zapcore.Encoder, moduleName, logFilename, logDir string, ...) (logger *zap.SugaredLogger, closer func() error, err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var LogCommonFormat = zapcore.EncoderConfig{ TimeKey: "ts", LevelKey: "level", NameKey: "logger", CallerKey: "caller", MessageKey: "msg", StacktraceKey: "stacktrace", LineEnding: zapcore.DefaultLineEnding, EncodeLevel: zapcore.CapitalLevelEncoder, EncodeTime: zapcore.ISO8601TimeEncoder, EncodeDuration: zapcore.StringDurationEncoder, EncodeCaller: zapcore.ShortCallerEncoder, }
Functions ¶
func New ¶
func New(parent *zap.SugaredLogger, moduleName string, options ...zap.Option) *zap.SugaredLogger
func NewOtherLogger ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.