Class: Birling
- Inherits:
-
Object
- Object
- Birling
- Defined in:
- lib/birling.rb
Defined Under Namespace
Modules: Formatter, Support Classes: Logger
Class Method Summary collapse
-
.open(path, options = nil) ⇒ Object
Opens a new log file at the given path with options: * encoding: The encoding of the file (default: ‘UTF8’) * period: The rotation period to use (optional) * retain_count: How many log files to retain when rotating (optional) * retain_period: How long rotated log files are retained for (optional) * formatter: Custom log formatter (optional) * program: Name of program being logged (optional) * time_source: Source of time to use (optional) * path_format: The strftime-compatible format for the path (optional).
Class Method Details
.open(path, options = nil) ⇒ Object
Opens a new log file at the given path with options:
-
encoding: The encoding of the file (default: ‘UTF8’)
-
period: The rotation period to use (optional)
-
retain_count: How many log files to retain when rotating (optional)
-
retain_period: How long rotated log files are retained for (optional)
-
formatter: Custom log formatter (optional)
-
program: Name of program being logged (optional)
-
time_source: Source of time to use (optional)
-
path_format: The strftime-compatible format for the path (optional)
19 20 21 |
# File 'lib/birling.rb', line 19 def self.open(path, = nil) Birling::Logger.new(path, ) end |