Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultEncoder ¶
DefaultEncoder creates a default zapcore.Encoder with json format
func DefaultEncoderConfig ¶
func DefaultEncoderConfig() zapcore.EncoderConfig
func DefaultLumberjackLogger ¶
func DefaultLumberjackLogger() *lumberjack.Logger
DefaultLumberjackLogger creates a default lumberjack.Logger 1. Backup will not be cleaned up automatically 2. Compress every 200MB, not rotate by time
Types ¶
type Plugin ¶
func NewFilePlugin ¶
NewFilePlugin The Lumberjack logger holds the file but does not expose the sync method, so there is no way to take advantage of the sync feature of zap. Therefore, an additional closer is returned, and it is necessary to ensure that the close is completed before the process exits to ensure that all the written content can be flashed 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.