Class: Logger
- Inherits:
-
Object
- Object
- Logger
- Defined in:
- lib/simple_logging.rb
Overview
TODO:
Move to its own gem the next time I find I need easier logging faculties
Class Method Summary collapse
-
.from_file_name(file_name, shift_age = 0, shift_size = 1048576) ⇒ Object
Defaults correspond to Logger#new defaults.
Instance Method Summary collapse
Class Method Details
.from_file_name(file_name, shift_age = 0, shift_size = 1048576) ⇒ Object
Defaults correspond to Logger#new defaults
9 10 11 12 13 14 15 16 |
# File 'lib/simple_logging.rb', line 9 def self.from_file_name(file_name, shift_age = 0, shift_size = 1048576) unless File.exists?(file_name) FileUtils.mkdir_p File.dirname(file_name) FileUtils.touch file_name end logger = new(file_name, shift_age, shift_size) end |
Instance Method Details
#path ⇒ Object
18 19 20 |
# File 'lib/simple_logging.rb', line 18 def path @logdev.filename end |