Documentation
¶
Index ¶
Constants ¶
View Source
const ( DefaultLogMaxMegaBytes = 10 // 10 MB DefaultLogMaxBackups = 5 DefaultLogMaxAge = 7 )
Variables ¶
This section is empty.
Functions ¶
func Get ¶
Get Returns a logger with default configuration if logger is not initialized yet default configuration only writes to console and not to file see param defaultFileLoggingEnabled
func GetLogPath ¶
func GetLogPath() string
Types ¶
type LogConfig ¶
type LogConfig struct { ConsoleLoggingEnabled bool LogLevel slog.Level LogFormat string // one of "plain" or "json" PrefixKey string PrefixValue string // FileLoggingEnabled makes the framework log to a file FileLoggingEnabled bool // Directory to log to when filelogging is enabled Directory string // Filename is the name of the logfile which will be placed inside the directory Filename string // MaxSize the max size in MB of the logfile before it's rolled MaxSize int // MaxBackups the max number of rolled files to keep MaxBackups int // MaxAge the max age in days to keep a logfile MaxAge int }
LogConfig defines the configuration for logging
Click to show internal directories.
Click to hide internal directories.