Module: Belated::Logging

Extended by:
Logging
Included in:
Belated, JobWrapper, Logging, Queue, Worker
Defined in:
lib/belated/logging.rb

Overview

Logger for Belated. Include this module in your class to get a logger.

Instance Method Summary collapse

Instance Method Details

#error(message) ⇒ Object



19
20
21
# File 'lib/belated/logging.rb', line 19

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

#log(message) ⇒ Object



11
12
13
# File 'lib/belated/logging.rb', line 11

def log(message)
  logger.__send__(Belated.log_level, message)
end

#loggerObject



7
8
9
# File 'lib/belated/logging.rb', line 7

def logger
  @logger ||= Belated.logger
end

#logger=(logger) ⇒ Object



23
24
25
# File 'lib/belated/logging.rb', line 23

def logger=(logger)
  @logger = logger
end

#warn(message) ⇒ Object



15
16
17
# File 'lib/belated/logging.rb', line 15

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