Skip to content

Commit

Permalink
Add ignore for logging 404s
Browse files Browse the repository at this point in the history
  • Loading branch information
richardhallett committed Mar 31, 2022
1 parent 0e6163b commit cab0764
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions config/initializers/lograge.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,9 @@
params: event.payload[:params].except(*exceptions),
}
end

config.lograge.ignore_custom = lambda do |event|
# If 404 is raised, it's a routing error and should be ignored
event.payload[:status] == 404
end
end

0 comments on commit cab0764

Please sign in to comment.