Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

ISO8601, I was doing it wrong

  • Loading branch information...
commit 0ca998efc827075af8c7c73c2299dba5c9ddcc5d 1 parent e166043
@paukul authored
View
3  lib/amqp_logging/metrics_agent.rb
@@ -35,7 +35,6 @@ def logger=(logger)
end
def flush
- puts "flushing #{self.object_id}"
logger.info(@fields.to_json + "\n")
reset_fields
end
@@ -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)
View
2  lib/amqp_logging/metrics_agent/rails.rb
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.