Skip to content

Commit

Permalink
Updated README to include how to customise log event
Browse files Browse the repository at this point in the history
  • Loading branch information
Owen Davies committed Mar 22, 2013
1 parent d22d013 commit 45919a2
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/).
Expand Down

0 comments on commit 45919a2

Please sign in to comment.