Project

General

Profile

Actions

Feature #19535

closed

Silence notification Rails logs

Added by Lukas Zapletal over 7 years ago. Updated over 3 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Category:
Notifications
Target version:
-
Difficulty:
Triaged:
No
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 1 (0 open1 closed)

Related to Foreman - Bug #18438: Allow adjusting notification checking periodClosedmatan werbner02/08/2017Actions
Actions #1

Updated by Lukas Zapletal over 7 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.

Actions #2

Updated by Lukas Zapletal over 7 years ago

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

Updated by yifat makias over 3 years ago

  • Status changed from New to Rejected
Actions

Also available in: Atom PDF