Module: RQ::Logging::LogClassMethods

Defined in:
lib/rq/logging.rb

Overview

module LogMethods

Instance Method Summary collapse

Instance Method Details

#default_loggerObject

–{{{



73
74
75
76
77
78
79
80
81
82
83
84
# File 'lib/rq/logging.rb', line 73

def default_logger
#--{{{
  if defined?(@default_logger) and @default_logger
    @default_logger
  else
    self.default_logger = Logger::new STDERR
    @default_logger = Logger::INFO
    @default_logger.warn{ "<#{ self }> using default logger"}
    @default_logger
  end
#--}}}
end

#default_logger=(log) ⇒ Object

–}}}



85
86
87
88
89
90
91
92
# File 'lib/rq/logging.rb', line 85

def default_logger= log
#--{{{
  @default_logger = (Logger === log ? log : Logger::new(log))
  @default_logger.extend LoggerExt
  @default_logger.logdev.dev.sync = true
  @default_logger
#--}}}
end