SimpLog::FileBackend
Inherits Log::IOBackend < Log::Backend < Reference < Object
Provides a Log::Backend that is backed with a log file that
supports automatic rotation, compression, and purging at specified
durations
Constants
Datetime pattern used to suffix rotated file names
Default compress duration: logs will be compress after 1 week
Default Log::DispatchMode
Default file extension used for gzip compressed log files
Default rotation duration: logs will be rotated after 1 day
Constructors
Creates a new LogFileBackend, filename should use .log extension for log retention to work correctly and ideally use a dedicated directory
Creates a new LogFileBackend with a log filename inferred from the executable filename
Instance methods
File age at which log files will be gzip compressed
File age at which log files will be purged, if not set logs will be retained forever by default
File age at which log files will be purged, if not set logs will be retained forever by default
Emits the entry to the log file, using the #formatter to convert
Writes an entry to the log file, first rotating the log file if required