Skip to content

Commit

Permalink
Actually it's microseconds, not nanoseconds
Browse files Browse the repository at this point in the history
  • Loading branch information
paukul committed Nov 15, 2010
1 parent e67383a commit 5106973
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions lib/amqp_logging.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/amqp_logging/metrics_agent.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/amqp_logging/metrics_agent/rails.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5106973

Please sign in to comment.