README.md in lograge-0.2.2 vs README.md in lograge-0.3.0
- old
+ new
@@ -73,9 +73,22 @@
{:name => "value", :timing => some_float.round(2), :host => event.payload[:host]}
end
end
```
+Or you can add a timestamp:
+
+```ruby
+MyApp::Application.configure do
+ config.lograge.enabled = true
+
+ # add time to lograge
+ config.lograge.custom_options = lambda do |event|
+ {:time => event.time}
+ end
+end
+```
+
You can then add custom variables to the event to be used in custom_options
```ruby
# app/controllers/application_controller.rb
class ApplicationController < ActionController::Base