URL:
https://github.com/SSSD/sssd/pull/5477
Title: #5477: DEBUG: Use () in program identifier instead of []
sigv commented:
"""
I meant "SYSLOG_IDENTIFIER=%s",
program_invocation_short_name of course.
I see. Yes, it does make sense, and aligns with the `--with-syslog=syslog` behavior.
>> I don't know why is this difference.
>
> The difference is in how rsyslog picks up the journald message and ships it to
BSD-style syslog (as the old RFC 3164).
This is a consequence. That doesn't answer my question.
If the question was about the difference between `SYSLOG_IDENTIFIER` and `SSSD_PRG_NAME`,
then the former is being changed for the BSD-style syslog output as described previously.
The latter does not get re-packaged into the content in the same way.
If there is a further question that should be answered, I think I am missing it.
---
Should I then restructure the PR to not have any changes to `debug_prg_name` and instead
have simply one line removed and one added as follows?
```diff
diff --git a/src/util/sss_log.c b/src/util/sss_log.c
index c6b7435c6..123456789 100644
--- a/src/util/sss_log.c
+++ b/src/util/sss_log.c
@@ -107,7 +107,7 @@ static void sss_log_internal(int priority, int facility, const char
*format,
"SSSD_DOMAIN=%s", domain,
"PRIORITY=%i", syslog_priority,
"SYSLOG_FACILITY=%i", LOG_FAC(facility),
- "SYSLOG_IDENTIFIER=sssd[%s]", debug_prg_name,
+ "SYSLOG_IDENTIFIER=%s", program_invocation_short_name,
NULL);
free(message);
```
"""
See the full comment at
https://github.com/SSSD/sssd/pull/5477#issuecomment-773187478