lib/semantic_logger/logger.rb in semantic_logger-0.4.0 vs lib/semantic_logger/logger.rb in semantic_logger-0.4.1

- old
+ new

@@ -136,15 +136,15 @@ result = yield # Add scoped payload if self.payload payload = payload.nil? ? self.payload : self.payload.merge(payload) end - self.class.queue << Log.new(:#{level}, self.class.thread_name, name, message, payload, start, Time.now - start, tags) + self.class.queue << Log.new(:#{level}, self.class.thread_name, name, message, payload, start, 1000.0 * (Time.now - start), tags) result rescue Exception => exc # TODO Need to be able to have both an exception and a Payload - self.class.queue << Log.new(:#{level}, self.class.thread_name, name, message, exc, start, Time.now - start, tags) + self.class.queue << Log.new(:#{level}, self.class.thread_name, name, message, exc, start, 1000.0 * (Time.now - start), tags) raise exc end else yield end @@ -228,13 +228,16 @@ reply_queue = Queue.new queue << { :command => :flush, :reply_queue => reply_queue } reply_queue.pop end - # Internal logger for SymanticLogger + # Internal logger for SemanticLogger # For example when an appender is not working etc.. # By default logs to STDERR, replace with another Ruby logger or Rails # logger, but never to SemanticLogger itself + # + # Warning: Do not use this logger directly it is intended for internal logging + # within Semantic Logger itself sync_cattr_accessor :logger do require 'logger' l = ::Logger.new(STDOUT) l.level = ::Logger::INFO l