Rotate
Last updated
Was this helpful?
Last updated
Was this helpful?
This package implements the gen.LoggerBehavior
interface and provides the capability to log messages to a file, with support for log file rotation at a specified interval.
Period
Specifies the rotation period (minimum value: time.Minute
)
TimeFormat
Sets the format for the timestamp in log messages. You can choose any existing format (see ) or define your own. By default, timestamps are in nanoseconds
IncludeBehavior
includes the process behavior in the log
IncludeName
includes the registered process name
ShortLevelName
enables shortnames for the log levels
Path
directory for the log files, default: ./log
Prefix
defines the log files name prefix (<Path>/<Prefix>.YYYYMMDDHHMi.log[.gz]
)
Compress
Enables gzip compression for log files
Depth
Specifies the number of log files in rotation