Documentation ¶
Overview ¶
Package logger @description wraps the zap logger and lumberjack
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultEncoder ¶
DefaultEncoder returns the default encoder, whish is utf-8
func DefaultEncoderConfig ¶
func DefaultEncoderConfig() zapcore.EncoderConfig
DefaultEncoderConfig returns the default encoder config
func DefaultLumberjackLogger ¶
func DefaultLumberjackLogger() *lumberjack.Logger
DefaultLumberjackLogger returns the default lumberjack logger, which is used to split logs
func DefaultOption ¶
DefaultOption returns the default zap logger options
Types ¶
type Plugin ¶
func NewFilePlugin ¶
NewFilePlugin creates a file plugin After get an io.Closer instance, You need to invoke Close() before the process exits to ensure that all the writing can be flushed to disk.
func NewPlugin ¶
func NewPlugin(writer zapcore.WriteSyncer, enabler zapcore.LevelEnabler) Plugin
func NewStderrPlugin ¶
func NewStderrPlugin(enabler zapcore.LevelEnabler) Plugin
func NewStdoutPlugin ¶
func NewStdoutPlugin(enabler zapcore.LevelEnabler) Plugin
Click to show internal directories.
Click to hide internal directories.