Skip to content

Default message for log lines #154

@hashwin

Description

@hashwin

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions