Project

General

Profile

Feature #19535

Silence notification Rails logs

Added by Lukas Zapletal over 4 years ago. Updated 8 months ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Category:
Notifications
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:

Description

Notifications are flooding our logs with 200 HTTP messages, use this or similar technique to silence it completely. This should be a YAML setting and it should be disabled by default, but user should be able to enable it via config flag and restart on demand:

https://archive.dennisreimann.de/blog/silencing-the-rails-log-on-a-per-action-basis/

[app|I] Started GET "/notification_recipients" for 127.0.0.1 at 2017-05-15 10:02:50 +0200
[app|I] Processing by NotificationRecipientsController#index as JSON
[app|I] Current user: admin (administrator)
[app|D] Setting current user thread-local variable to admin
[notifications|D] Cache Hit: notification, reading cache for notification-3
[app|D] Body: {"notifications":[{"id":17,"seen":false,"level":"info","text":"somehost-265776 has been deleted successfully","created_at":"2017-05-15T06:44:26.196Z","group":"Hosts","actions":{}}]}
[app|I] Completed 200 OK in 3ms (Views: 0.1ms | ActiveRecord: 0.2ms)

Related issues

Related to Foreman - Bug #18438: Allow adjusting notification checking periodClosed2017-02-08

History

#1 Updated by Lukas Zapletal over 4 years ago

When notification (or any arbitrary path) is silenced and response is non 2xx we can log short message about it asking user to change the setting to see the logs.

#2 Updated by Lukas Zapletal over 4 years ago

  • Related to Bug #18438: Allow adjusting notification checking period added

#3 Updated by yifat makias 8 months ago

  • Status changed from New to Rejected

Also available in: Atom PDF