class SemanticLogger::Processor
Thread
that submits and processes log requests
Attributes
logger[W]
appenders[R]
Public Class Methods
logger()
click to toggle source
Internal logger for SemanticLogger
For example when an appender is not working etc.. By default logs to $stderr
# File lib/semantic_logger/processor.rb, line 15 def self.logger @logger ||= begin l = SemanticLogger::Appender::File.new(io: $stderr, level: :warn) l.name = name l end end
new(max_queue_size: -1)
click to toggle source
Calls superclass method
SemanticLogger::Appender::Async::new
# File lib/semantic_logger/processor.rb, line 26 def initialize(max_queue_size: -1) @appenders = Appenders.new(self.class.logger.dup) super(appender: @appenders, max_queue_size: max_queue_size) end
Public Instance Methods
start()
click to toggle source
Start the appender thread
# File lib/semantic_logger/processor.rb, line 32 def start return false if active? thread true end