Permalink
Browse files

Actually it's microseconds, not nanoseconds

  • Loading branch information...
paukul committed Nov 15, 2010
1 parent e67383a commit 51069735b29fe874cd2fbd3e6ccece09bb97725c
Showing with 3 additions and 2 deletions.
  1. +1 −0 lib/amqp_logging.rb
  2. +1 −1 lib/amqp_logging/metrics_agent.rb
  3. +1 −1 lib/amqp_logging/metrics_agent/rails.rb
View
@@ -13,6 +13,7 @@ module AMQPLogging
private
def self.iso_time_with_nanoseconds(t = Time.now)
+ def self.iso_time_with_microseconds(t = Time.now)
t.strftime("%Y-%m-%dT%H:%M:%S.#{t.usec}")
end
end
@@ -44,7 +44,7 @@ def []=(fieldname, value)
end
def add_logline(severity, message, progname, logger)
- timestring = AMQPLogging.iso_time_with_nanoseconds
+ timestring = AMQPLogging.iso_time_with_microseconds
logtype = @logger_types[logger]
lines = @fields[:loglines][logtype]
if !@truncated_status[logtype] && lines.size < @max_lines_per_logger
@@ -8,7 +8,7 @@
class ActionController::Base
def log_processing_for_request_id_with_metrics_agent
logger.agent[:page] = "#{self.class.name}\##{action_name}"
- logger.agent[:started_at] = AMQPLogging.iso_time_with_nanoseconds
+ logger.agent[:started_at] = AMQPLogging.iso_time_with_microseconds
log_processing_for_request_id_without_metrics_agent
end
alias_method_chain :log_processing_for_request_id, :metrics_agent

0 comments on commit 5106973

Please sign in to comment.