Class: QAT::Logger::RollingFileOutputter
- Inherits:
-
Log4r::RollingFileOutputter
- Object
- Log4r::RollingFileOutputter
- QAT::Logger::RollingFileOutputter
- Defined in:
- lib/qat/logger/outputter/file.rb
Overview
This class represents a generic RollingFile output handler
Instance Attribute Summary collapse
-
#previous_file ⇒ Object
readonly
Returns the value of attribute previous_file.
Instance Method Summary collapse
-
#initialize(name, hash = {}) ⇒ RollingFileOutputter
constructor
Creates a output handler for File logging logging using RollingFileOutputter, named
name
with a an optionshash
. -
#roll_file ⇒ Object
roll the file.
Constructor Details
#initialize(name, hash = {}) ⇒ RollingFileOutputter
Creates a output handler for File logging logging using RollingFileOutputter, named name
with a an options hash
.
Default options are:
-
‘filename’ = ‘public/logger_testing.log’ defined on yaml file configuration
-
‘trunc’ = ‘true’ defined on yaml file configuration
See QAT::Logger::Formatter See Log4r::RollingFileOutputter See Log4r::FileOutputter See Log4r::ALL
23 24 25 |
# File 'lib/qat/logger/outputter/file.rb', line 23 def initialize name, hash={} super name, hash end |
Instance Attribute Details
#previous_file ⇒ Object (readonly)
Returns the value of attribute previous_file.
10 11 12 |
# File 'lib/qat/logger/outputter/file.rb', line 10 def previous_file @previous_file end |
Instance Method Details
#roll_file ⇒ Object
roll the file
28 29 30 31 32 33 |
# File 'lib/qat/logger/outputter/file.rb', line 28 def roll_file # call the roll method of Log4r::RollingFileOutputter get_filename roll previous_file end |