Class | Yell::Adapters::Datefile |
In: |
lib/yell/adapters/datefile.rb
|
Parent: | Yell::Adapters::File |
DefaultDatePattern | = | "%Y%m%d" | The default date pattern, e.g. "19820114" (14 Jan 1982) | |
Header | = | lambda { |date, pattern| "# -*- #{date.iso8601} (#{date.to_f}) [#{pattern}] -*-" } | Metadata | |
HeaderRegexp | = | /^# -\*- (.+) \((\d+\.\d+)\) \[(.+)\] -\*-$/ |
date_pattern | [RW] |
The pattern to be used for the files
@example date_pattern = "%Y%m%d" # default date_pattern = "%Y-week-%V" |
header | [RW] |
You can suppress the first line of the logfile that contains the metadata.
This is important upon rollover, because on *nix systems, it is not
possible to determine the creation time of a file, on the last access time.
The header compensates this.
@example header = false |
keep | [RW] |
Set the amount of logfiles to keep when rolling over. By default, no files
will be cleaned up.
@example Keep the last 5 logfiles keep = 5 keep = '10' @example Do not clean up any files keep = 0 |
symlink | [RW] |
Tell the adapter to create a symlink onto the currently active
(timestamped) file. Upon rollover, the symlink is set to the newly created
file, and so on.
@example symlink = true |