Class: Employer::Logger

Inherits:
Object
  • Object
show all
Defined in:
lib/employer/logger.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeLogger

Returns a new instance of Logger.



5
6
7
# File 'lib/employer/logger.rb', line 5

def initialize
  @loggers = []
end

Instance Attribute Details

#loggersObject (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(message = nil, &block)
  log(:debug, message, &block)
end

#error(message = nil, &block) ⇒ Object



17
18
19
# File 'lib/employer/logger.rb', line 17

def error(message = nil, &block)
  log(:error, message, &block)
end

#fatal(message = nil, &block) ⇒ Object



29
30
31
# File 'lib/employer/logger.rb', line 29

def fatal(message = nil, &block)
  log(:fatal, message, &block)
end

#info(message = nil, &block) ⇒ Object



25
26
27
# File 'lib/employer/logger.rb', line 25

def info(message = nil, &block)
  log(:info, message, &block)
end

#warn(message = nil, &block) ⇒ Object



21
22
23
# File 'lib/employer/logger.rb', line 21

def warn(message = nil, &block)
  log(:warn, message, &block)
end