package
0.0.0-20241116165817-883d5d7d379c
Repository: https://github.com/ddkwork/toolbox.git
Documentation: pkg.go.dev
# Functions
DefaultPath returns the default path that will be used.
MaxBackups sets the maximum number of old log files to retain.
MaxSize sets the maximum size of the log file before it gets rotated.
New creates a new Rotator with the specified options.
ParseAndSetupLogging adds command-line options for controlling logging, parses the command line, then instantiates a rotator and attaches it to slog.
Path specifies the file to write logs to.
WithMask sets the mask when creating files, which have the unmasked mode of 0644, and directories, which have the unmasked mode of 0755.
# Variables
PathToLog holds the path to the log file that was configured on the command line when using ParseAndSetup().