Project

General

Profile

Feature #22570

Enable syslog for candlepin

Added by Lukas Zapletal over 1 year ago. Updated 4 months ago.

Status:
Assigned
Priority:
Normal
Assignee:
-
Category:
Foreman modules
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

By default candlepin uses rolling file appender, we want it to log into syslog which is currently supported upstream. Use local4 facility for all logs. By default candlepin does put correlation id (csid) on each line, the logging line should look like:

<pattern>[%X{requestType}=%X{requestUuid}, org=%X{org}, csid=%X{csid}] %-5p %c - %m%n</pattern>

More details how to configure syslog for candlepin: http://www.candlepinproject.org/docs/candlepin/logging.html#logging-to-syslog

Also configure syslog to file all local4 logs into /var/log/candlepin/candlepin.log so users find it on the old path for easy transition. In the first phase, candlepin will only log in plaintext. Although it is possible to change the pattern to log in JSON format, installer will not support that for now.


Related issues

Related to Foreman - Tracker #22569: Unified and structured loggingAssigned

History

#1 Updated by Lukas Zapletal over 1 year ago

#2 Updated by Lukas Zapletal 4 months ago

  • Status changed from New to Assigned

Pattern proposal:

<pattern>@cee:{"message":"%m","foreman":{"request":"%X{csid}","org_id":"%X{org}"},"candlepin":{"thread":"%thread","request_type":"%X{requestUuid}","request_uuid":"%X{requestUuid}"}%n</pattern>

Also available in: Atom PDF