Class: Employer::Logger
- Inherits:
-
Object
- Object
- Employer::Logger
- Defined in:
- lib/employer/logger.rb
Instance Attribute Summary collapse
-
#loggers ⇒ Object
readonly
Returns the value of attribute loggers.
Instance Method Summary collapse
- #append_to(logger) ⇒ Object
- #debug(message = nil, &block) ⇒ Object
- #error(message = nil, &block) ⇒ Object
- #fatal(message = nil, &block) ⇒ Object
- #info(message = nil, &block) ⇒ Object
-
#initialize ⇒ Logger
constructor
A new instance of Logger.
- #warn(message = nil, &block) ⇒ Object
Constructor Details
#initialize ⇒ Logger
Returns a new instance of Logger.
5 6 7 |
# File 'lib/employer/logger.rb', line 5 def initialize @loggers = [] end |
Instance Attribute Details
#loggers ⇒ Object (readonly)
Returns the value of attribute loggers.
3 4 5 |
# File 'lib/employer/logger.rb', line 3 def loggers @loggers end |
Instance Method Details
#append_to(logger) ⇒ Object
9 10 11 |
# File 'lib/employer/logger.rb', line 9 def append_to(logger) loggers << logger end |
#debug(message = nil, &block) ⇒ Object
13 14 15 |
# File 'lib/employer/logger.rb', line 13 def debug( = nil, &block) log(:debug, , &block) end |
#error(message = nil, &block) ⇒ Object
17 18 19 |
# File 'lib/employer/logger.rb', line 17 def error( = nil, &block) log(:error, , &block) end |
#fatal(message = nil, &block) ⇒ Object
29 30 31 |
# File 'lib/employer/logger.rb', line 29 def fatal( = nil, &block) log(:fatal, , &block) end |
#info(message = nil, &block) ⇒ Object
25 26 27 |
# File 'lib/employer/logger.rb', line 25 def info( = nil, &block) log(:info, , &block) end |
#warn(message = nil, &block) ⇒ Object
21 22 23 |
# File 'lib/employer/logger.rb', line 21 def warn( = nil, &block) log(:warn, , &block) end |