Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Updated README to include how to customise log event #33

Merged
merged 1 commit into from

2 participants

@obduk

No description provided.

@roidrage roidrage merged commit d8a4709 into roidrage:master
@roidrage
Owner

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 22, 2013
  1. @obduk
This page is out of date. Refresh to see the latest.
Showing with 12 additions and 0 deletions.
  1. +12 −0 README.md
View
12 README.md
@@ -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/).
Something went wrong with that request. Please try again.