Module: PikaQue::Logging
Defined Under Namespace
Classes: PikaQueFormatter
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.init_logger(stream = STDOUT) ⇒ Object
13
14
15
16
17
18
|
# File 'lib/pika_que/logging.rb', line 13
def self.init_logger(stream = STDOUT)
@logger = Logger.new(stream, 5, 1048576).tap do |l|
l.level = Logger::INFO
l.formatter = PikaQueFormatter.new
end
end
|
.logger ⇒ Object
20
21
22
|
# File 'lib/pika_que/logging.rb', line 20
def self.logger
@logger || init_logger
end
|
.logger=(logger) ⇒ Object
24
25
26
|
# File 'lib/pika_que/logging.rb', line 24
def self.logger=(logger)
@logger = logger ? logger : Logger.new(File::NULL)
end
|