Class: Logz::Config
- Inherits:
-
Object
- Object
- Logz::Config
- Defined in:
- lib/logz.rb
Instance Attribute Summary collapse
-
#extension ⇒ Object
Returns the value of attribute extension.
-
#folder ⇒ Object
Returns the value of attribute folder.
-
#levels ⇒ Object
Returns the value of attribute levels.
-
#loggers ⇒ Object
Returns the value of attribute loggers.
-
#output_to_file ⇒ Object
Returns the value of attribute output_to_file.
-
#output_to_stdout ⇒ Object
Returns the value of attribute output_to_stdout.
-
#prefix ⇒ Object
Returns the value of attribute prefix.
-
#suffix ⇒ Object
Returns the value of attribute suffix.
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
14 15 16 17 18 19 20 21 22 23 |
# File 'lib/logz.rb', line 14 def initialize @output_to_stdout = true @output_to_file = true @folder = "log" @extension = "log" @loggers = [:stdout] @suffix = "" @prefix = "" @levels = %i(debug info warn error fatal unknown) end |
Instance Attribute Details
#extension ⇒ Object
Returns the value of attribute extension.
11 12 13 |
# File 'lib/logz.rb', line 11 def extension @extension end |
#folder ⇒ Object
Returns the value of attribute folder.
11 12 13 |
# File 'lib/logz.rb', line 11 def folder @folder end |
#levels ⇒ Object
Returns the value of attribute levels.
11 12 13 |
# File 'lib/logz.rb', line 11 def levels @levels end |
#loggers ⇒ Object
Returns the value of attribute loggers.
11 12 13 |
# File 'lib/logz.rb', line 11 def loggers @loggers end |
#output_to_file ⇒ Object
Returns the value of attribute output_to_file.
11 12 13 |
# File 'lib/logz.rb', line 11 def output_to_file @output_to_file end |
#output_to_stdout ⇒ Object
Returns the value of attribute output_to_stdout.
11 12 13 |
# File 'lib/logz.rb', line 11 def output_to_stdout @output_to_stdout end |
#prefix ⇒ Object
Returns the value of attribute prefix.
11 12 13 |
# File 'lib/logz.rb', line 11 def prefix @prefix end |
#suffix ⇒ Object
Returns the value of attribute suffix.
11 12 13 |
# File 'lib/logz.rb', line 11 def suffix @suffix end |