lib/td/logger/agent/rails.rb in td-logger-0.3.14 vs lib/td/logger/agent/rails.rb in td-logger-0.3.15
- old
+ new
@@ -45,8 +45,16 @@
end
else
TreasureData::Logger::Agent::Rails.init(::Rails.configuration)
end
+ # implement ActiveSupport::TimeWithZone#to_msgpack
+ unless ActiveSupport::TimeWithZone.method_defined?(:to_msgpack)
+ class ActiveSupport::TimeWithZone
+ def to_msgpack(out='')
+ strftime("%Y-%m-%d %H:%M:%S %z").to_msgpack(out)
+ end
+ end
+ end
end
end
end