Skip to content

Commit

Permalink
ISO8601, I was doing it wrong
Browse files Browse the repository at this point in the history
  • Loading branch information
paukul committed Nov 15, 2010
1 parent e166043 commit 0ca998e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions lib/amqp_logging/metrics_agent.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ def logger=(logger)
end

def flush
puts "flushing #{self.object_id}"
logger.info(@fields.to_json + "\n")
reset_fields
end
Expand All @@ -51,7 +50,7 @@ def []=(fieldname, value)
def add_logline(severity, message, progname, logger)
t = Time.now
msg = (message || progname).strip
@fields[:loglines][@logger_types[logger]] << [severity, t.strftime("%Y-%d-%mT%H:%M:%S.#{t.usec}"), msg]
@fields[:loglines][@logger_types[logger]] << [severity, t.strftime("%Y-%m-%dT%H:%M:%S.#{t.usec}"), msg]
end

def wrap_logger(logger, type = :default)
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 @@ -9,7 +9,7 @@ class ActionController::Base
def log_processing_for_request_id_with_metrics_agent
logger.agent[:page] = "#{self.class.name}\##{action_name}"
t = Time.now
logger.agent[:started_at] = t.strftime("%Y-%d-%mT%H:%M:%S.#{t.usec}")
logger.agent[:started_at] = t.strftime("%Y-%m-%dT%H:%M:%S.#{t.usec}")
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 0ca998e

Please sign in to comment.