README.md in logstasher-0.4.9 vs README.md in logstasher-0.5.0
- old
+ new
@@ -57,10 +57,13 @@
config.logstasher.enabled = true
# This line is optional if you do not want to suppress app logs in your <environment>.log
config.logstasher.suppress_app_log = false
+ # This line is optional, it allows you to set a custom value for the @source field of the log event
+ config.logstasher.source = 'your.arbitrary.source'
+
## Logging params hash
Logstasher can be configured to log the contents of the params hash. When enabled, the contents of the params hash (minus the ActionController internal params)
will be added to the log as a deep hash. This can cause conflicts within the Elasticsearch mappings though, so should be enabled with care. Conflicts will occur
if different actions (or even different applications logging to the same Elasticsearch cluster) use the same params key, but with a different data type (e.g. a
@@ -77,10 +80,10 @@
# Create a file - config/initializers/logstasher.rb
if LogStasher.enabled
LogStasher.add_custom_fields do |fields|
- # This block is run in application_controller context,
+ # This block is run in application_controller context,
# so you have access to all controller methods
fields[:user] = current_user && current_user.mail
fields[:site] = request.path =~ /^\/api/ ? 'api' : 'user'
# If you are using custom instrumentation, just add it to logstasher custom fields