Class: Oca::Logger
- Inherits:
-
Object
- Object
- Oca::Logger
- Defined in:
- lib/oca-epak/logger.rb
Instance Attribute Summary collapse
-
#logger_options ⇒ Object
readonly
Returns the value of attribute logger_options.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ Logger
constructor
Receives a hash with keys ‘log`, `pretty_print_xml`, `log_level` and `logger`.
Constructor Details
#initialize(opts = {}) ⇒ Logger
Receives a hash with keys ‘log`, `pretty_print_xml`, `log_level` and `logger`. `log_level` can be :info, :debug, :warn, :error or :fatal
14 15 16 17 18 19 20 |
# File 'lib/oca-epak/logger.rb', line 14 def initialize(opts = {}) @logger_options = {} @logger_options[:log] = opts[:log] || false @logger_options[:pretty_print_xml] = opts[:pretty_print_xml] || false @logger_options[:log_level] = opts[:log_level] || :info @logger_options[:logger] = opts[:logger] if opts[:logger] end |
Instance Attribute Details
#logger_options ⇒ Object (readonly)
Returns the value of attribute logger_options.
3 4 5 |
# File 'lib/oca-epak/logger.rb', line 3 def @logger_options end |