Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( LogReportCaller = false // LogReportCaller determines whether the logger includes caller information (file and line number) in log messages. LumberjackLogger *lumberjack.Logger // LumberjackLogger is initialized as the default rotating logger for log file management via DefaultLumberjackLogger. Formatter log.Formatter // Formatter defines the formatter used for structuring log messages. )
Functions ¶
func DefaultLumberjackLogger ¶
func DefaultLumberjackLogger() *lumberjack.Logger
DefaultLumberjackLogger returns a configured Lumberjack logger instance. The logger is used for managing file-based log rotation. Configuration:
- Filename: Path to the log file for writing logs.
- MaxSize: Maximum size of a log file in MB before rotation occurs.
- MaxBackups: Maximum number of old log files to retain.
- MaxAge: Maximum number of days old log files are retained.
- Compress: Specifies whether to compress old log files.
func LogSetup ¶
func LogSetup()
LogSetup initializes the logging system by creating a log file and starting a monitoring routine for file rotation. Default:
- LumberjackLogger used as default. You can also change it
func NestedLogFormatter ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.