URL: https://github.com/SSSD/sssd/pull/5477 Author: sigv Title: #5477: DEBUG: Drop custom syslog identifier from journald Action: synchronized
To pull the PR as Git branch: git remote add ghsssd https://github.com/SSSD/sssd git fetch ghsssd pull/5477/head:pr5477 git checkout pr5477
From 1a4f9bd6f85928e6a9afb6490fe84d41dc09d7e5 Mon Sep 17 00:00:00 2001 From: Valters Jansons <valters.jans...@also.com> Date: Thu, 4 Feb 2021 13:59:21 +0200 Subject: [PATCH] DEBUG: Drop custom syslog identifier from journald `SYSLOG_IDENTIFIER` field is removed from logging output to journald. The default behavior will use the program name automatically. This ensures that if there is rsyslog in place, producing BSD-format syslog output (RFC 3164), then there are no unexpected `[` characters. The resulting syslog output will also be aligned with the behavior of `--with-syslog=syslog` which uses the program name by default. `SSSD_PRG_NAME` field has been added to the journald log as well, to be consistent with the `DEBUG()` output. This field holds the value that `SYSLOG_IDENTIFIER` had previously and can be used for filtering journal as a drop-in replacement. Resolves: https://github.com/SSSD/sssd/issues/4590 :relnote: Rename `SYSLOG_IDENTIFIER` to `SSSD_PRG_NAME` in journald output, to avoid issues with PID parsing in rsyslog (BSD-style forwarder) output. --- src/util/sss_log.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/sss_log.c b/src/util/sss_log.c index c6b7435c66..3c415d4ff9 100644 --- a/src/util/sss_log.c +++ b/src/util/sss_log.c @@ -105,9 +105,9 @@ static void sss_log_internal(int priority, int facility, const char *format, syslog_priority = sss_to_syslog(priority); sd_journal_send("MESSAGE=%s", message, "SSSD_DOMAIN=%s", domain, + "SSSD_PRG_NAME=sssd[%s]", debug_prg_name, "PRIORITY=%i", syslog_priority, "SYSLOG_FACILITY=%i", LOG_FAC(facility), - "SYSLOG_IDENTIFIER=sssd[%s]", debug_prg_name, NULL); free(message);
_______________________________________________ sssd-devel mailing list -- sssd-devel@lists.fedorahosted.org To unsubscribe send an email to sssd-devel-le...@lists.fedorahosted.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedorahosted.org/archives/list/sssd-devel@lists.fedorahosted.org