Method: SemanticLogger::Logger#log

Defined in:
lib/semantic_logger/logger.rb

#log(log, message = nil, progname = nil, &block) ⇒ Object

Place log request on the queue for the Appender thread to write to each appender in the order that they were registered

Subscribers are called inline before handing off to the queue so that they can capture additional context information as needed.



68
69
70
71
72
73
74
75
# File 'lib/semantic_logger/logger.rb', line 68

def log(log, message = nil, progname = nil, &block)
  # Compatibility with ::Logger
  return add(log, message, progname, &block) unless log.is_a?(SemanticLogger::Log)

  Logger.call_subscribers(log)

  Logger.processor.log(log)
end