Class: SkinnyControllers::Logging::Logger
- Inherits:
-
Object
- Object
- SkinnyControllers::Logging::Logger
- Defined in:
- lib/skinny_controllers/logging.rb
Instance Attribute Summary collapse
-
#_logger ⇒ Object
Returns the value of attribute _logger.
-
#_tag ⇒ Object
Returns the value of attribute _tag.
Instance Method Summary collapse
- #info(*args) ⇒ Object
-
#initialize ⇒ Logger
constructor
A new instance of Logger.
- #warn(*args) ⇒ Object
Constructor Details
#initialize ⇒ Logger
Returns a new instance of Logger.
13 14 15 16 |
# File 'lib/skinny_controllers/logging.rb', line 13 def initialize @_logger = ActiveSupport::TaggedLogging.new(ActiveSupport::Logger.new(STDOUT)) @_tag = 'skinny_controllers' end |
Instance Attribute Details
#_logger ⇒ Object
Returns the value of attribute _logger.
11 12 13 |
# File 'lib/skinny_controllers/logging.rb', line 11 def _logger @_logger end |
#_tag ⇒ Object
Returns the value of attribute _tag.
12 13 14 |
# File 'lib/skinny_controllers/logging.rb', line 12 def _tag @_tag end |
Instance Method Details
#info(*args) ⇒ Object
22 23 24 |
# File 'lib/skinny_controllers/logging.rb', line 22 def info(*args) _logger.tagged(_tag) { _logger.info(*args) } end |
#warn(*args) ⇒ Object
18 19 20 |
# File 'lib/skinny_controllers/logging.rb', line 18 def warn(*args) _logger.tagged(_tag) { _logger.warn(*args) } end |