Permalink
Browse files

Merge pull request #33 from obduk/add_event_contif_to_readme

Updated README to include how to customise log event
  • Loading branch information...
roidrage committed Mar 25, 2013
2 parents d22d013 + 45919a2 commit d8a4709ee134bc4033094f63265e8f722eb011e9
Showing with 12 additions and 0 deletions.
  1. +12 −0 README.md
View
@@ -75,6 +75,18 @@ MyApp::Application.configure do
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
+ def append_info_to_payload(payload)
+ super
+ payload["host"] = request.host
+ end
+end
+```
+
Lograge supports multiple output formats. The most common is the default
lograge format described above. Alternatively, you can also generate JSON
logs in the json_event format used by [Logstash](http://logstash.net/).

0 comments on commit d8a4709

Please sign in to comment.