README.md in logstasher-0.5.3 vs README.md in logstasher-0.6.0
- old
+ new
@@ -92,10 +92,19 @@
# If you are using custom instrumentation, just add it to logstasher custom fields
LogStasher.custom_fields << :myapi_runtime
end
end
+## Logging ActionMailer events
+
+Logstasher can easily log messages from `ActionMailer`, such as incoming/outgoing e-mails and e-mail content generation (Rails >= 4.1).
+This functionality is automatically enabled. Since the relationship between a concrete HTTP request and a mailer invocation is lost
+once in an `ActionMailer` instance method, global (per-request) state is kept to correlate HTTP requests and events from other parts
+of rails, such as `ActionMailer`. Every time a request is invoked, a `request_id` key is added which is present on every `ActionMailer` event.
+
+Note: Since mailers are executed within the lifetime of a request, they will show up in logs prior to the actual request.
+
## Listening to `ActiveSupport::Notifications` events
It is possible to listen to any `ActiveSupport::Notifications` events and store arbitrary data to be included in the final JSON log entry:
# In config/initializers/logstasher.rb
@@ -133,10 +142,10 @@
* Start logstash with the following command:
```
java -jar logstash-1.3.3-flatjar.jar agent -f quickstart.conf -- web
```
* Visit http://localhost:9292/ to see the Kibana interface and your parsed logs
-* For advanced options see the latest logstash documentation at [logstash.net](http://www.logstash.net/) or visit my blog at (shadabahmed.com)[http://shadabahmed.com/blog/2013/04/30/logstasher-for-awesome-rails-logging] (slightly outdated but will sure give you ideas for distributed setup etc.)
+* For advanced options see the latest logstash documentation at [logstash.net](http://www.logstash.net/) or visit my blog at [shadabahmed.com](http://shadabahmed.com/blog/2013/04/30/logstasher-for-awesome-rails-logging) (slightly outdated but will sure give you ideas for distributed setup etc.)
## Versions
All versions require Rails 3.0.x and higher and Ruby 1.9.2+. Tested on Rails 4 and Ruby 2.0
## Development