Class: DisqueJockey::Logger

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

Instance Method Summary collapse

Constructor Details

#initialize(klass) ⇒ Logger

Returns a new instance of Logger.



6
7
8
9
10
11
# File 'lib/disque_jockey/logger.rb', line 6

def initialize(klass)
  init_color_scheme
  @logger = Logging.logger[klass]
  @logger.add_appenders(*log_appenders)
  @logger.level = :info
end

Instance Method Details

#debug(message) ⇒ Object



34
35
36
# File 'lib/disque_jockey/logger.rb', line 34

def debug(message)
  @logger.debug(message)
end

#error(message) ⇒ Object



22
23
24
# File 'lib/disque_jockey/logger.rb', line 22

def error(message)
  @logger.error(message)
end

#fatal(message) ⇒ Object

logging levels



18
19
20
# File 'lib/disque_jockey/logger.rb', line 18

def fatal(message)
  @logger.fatal(message)
end

#info(message) ⇒ Object



30
31
32
# File 'lib/disque_jockey/logger.rb', line 30

def info(message)
  @logger.info(message)
end

#loggerObject



13
14
15
# File 'lib/disque_jockey/logger.rb', line 13

def logger
  @logger
end

#warn(message) ⇒ Object



26
27
28
# File 'lib/disque_jockey/logger.rb', line 26

def warn(message)
  @logger.warn(message)
end