Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
func WithDebug ¶
func WithDebug() Option
WithDebug returns an Option to configure the Logger for a debug environment. When this option is set: 1. Log files will not be saved locally. 2. Log messages will be output to the terminal. 3. The log level will be set to Debug. This is useful to ensure that unit tests do not produce persistent log files and provide verbose logging output for debugging.
func WithLevel ¶
WithLevel returns an Option to set the logging level for the Logger. The provided lvl will determine the verbosity of logging output.
func WithLogFileAge ¶
WithLogFileAge returns an Option to set the maximum age for the Logger's log files. The provided age is in days and determines the maximum number of days a log file is retained. If age is set to 0, log files will not be deleted based on age.
func WithLogFileSize ¶
WithLogFileSize returns an Option to set the maximum file size for the Logger's log files. The provided size is in MiB (Mebibytes) and determines the maximum size a log file can grow before it gets rotated.
func WithLogPath ¶
WithLogPath returns an Option to set the directory path where the Logger's log files will be saved. The provided path determines the destination folder for all log files created by the Logger.