logging - Is this possible to change rails logs messages? -
standard start of rails log message this:
started "/newrelic" 192.168.18.36 @ 2013-09-04 15:19:34 +0200 but have this:
[request_id] started "/newrelic" 192.168.18.36 @ 2013-09-04 15:19:34 +0200 is possible achevie this?
yes, it's possible. can achieve using config.log_tags. log_tags option added in rails 3.2 , can used prepend information each log message.
in /config/environments/development.rb
myapp::application.configure config.log_tags = [:request_id] ... end
Comments
Post a Comment