logstasher
logstasher copied to clipboard
Default message for log lines
When using filebeat, if I specify a message, it shows up in the log stream, otherwise it shows up as
failed to find message
Lograge specifes a default message like this: https://github.com/roidrage/lograge/blob/master/lib/lograge/formatters/logstash.rb#L10
I am able to set it for controller methods like this:
LogStasher.add_custom_fields do |fields|
fields[:message] = "[#{status}] #{fields[:controller]}##{fields[:action]}"
end
But when using ActiveJob and views, this is never called. Ideally, there should be some default messages here because Rails is pretty standard that way, but I should at least be able to configure it. Is there a provision where I could set this up?