Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Level *LogLevel.LogLevel // the minimum log level to write. Default is INFO. MaxBufferSizeBytes *int // the maximum size of the write buffer before it is flushed. Default is 4 KB. MaxFileSizeBytes *int // the maximum size of the log file before it is rotated. Default is 1 GB. FlushInterval *time.Duration // the interval at which the write buffer is flushed. Default is 15 seconds. DirectoryPath *string // the directory path where the log file is stored. Default is the current working directory ("."). To disable file logging, set this to an empty string. ConsoleOut *ConsoleLogger // the logger to write to the console. Default is ConsoleLogger{l: nil}. When l is nil, console logging is disabled. This is configurable for easy testing. }
Config holds the configuration settings for the Logger.
func (*Config) ApplyDefaults ¶
func (cfg *Config) ApplyDefaults()
ApplyDefaults applies the default values to the given Config if they are nil.
type ConsoleLogger ¶
ConsoleLogger wraps *log.Logger to allow nil value semantics for disabled state
Click to show internal directories.
Click to hide internal directories.