Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default message for log lines #154

Open
hashwin opened this issue Sep 24, 2020 · 0 comments
Open

Default message for log lines #154

hashwin opened this issue Sep 24, 2020 · 0 comments

Comments

@hashwin
Copy link

hashwin commented Sep 24, 2020

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant