Class: ClearLogic::Logger::Adapter
- Inherits:
-
Object
- Object
- ClearLogic::Logger::Adapter
- Defined in:
- lib/clear_logic/logger/adapter.rb
Instance Attribute Summary collapse
-
#log_path ⇒ Object
readonly
Returns the value of attribute log_path.
-
#logger_class ⇒ Object
readonly
Returns the value of attribute logger_class.
-
#service_class ⇒ Object
readonly
Returns the value of attribute service_class.
Instance Method Summary collapse
-
#initialize(service_class) ⇒ Adapter
constructor
A new instance of Adapter.
- #logger ⇒ Object
Constructor Details
#initialize(service_class) ⇒ Adapter
Returns a new instance of Adapter.
8 9 10 11 12 |
# File 'lib/clear_logic/logger/adapter.rb', line 8 def initialize(service_class) @service_class = service_class @logger_class = service_class.logger_class @log_path = service_class.[:log_path] || default_log_path end |
Instance Attribute Details
#log_path ⇒ Object (readonly)
Returns the value of attribute log_path.
6 7 8 |
# File 'lib/clear_logic/logger/adapter.rb', line 6 def log_path @log_path end |
#logger_class ⇒ Object (readonly)
Returns the value of attribute logger_class.
6 7 8 |
# File 'lib/clear_logic/logger/adapter.rb', line 6 def logger_class @logger_class end |
#service_class ⇒ Object (readonly)
Returns the value of attribute service_class.
6 7 8 |
# File 'lib/clear_logic/logger/adapter.rb', line 6 def service_class @service_class end |
Instance Method Details
#logger ⇒ Object
14 15 16 |
# File 'lib/clear_logic/logger/adapter.rb', line 14 def logger @logger ||= create_logger end |