Class Lumberjack::Device::RollingLogFile
In: lib/lumberjack/device/rolling_log_file.rb
Parent: LogFile

This is an abstract class for a device that appends entries to a file and periodically archives the existing file and starts a one. Subclasses must implement the roll_file? and archive_file_suffix methods.

The :keep option can be used to specify a maximum number of rolled log files to keep. Older files will be deleted based on the time they were created. The default is to keep all files.

Methods

Attributes

keep  [RW] 
path  [R] 

Public Class methods

Public Instance methods

Returns a suffix that will be appended to the file name when it is archived.. The suffix should change after it is time to roll the file. The log file will be renamed when it is rolled.

Return true if the file should be rolled.

Protected Instance methods

This method will be called after a file has been rolled. Subclasses can implement code to reset the state of the device. This method is thread safe.

[Validate]