URL: https://github.com/SSSD/sssd/pull/5477
Title: #5477: DEBUG: Use () in program identifier instead of []

alexey-tikhonov commented:
"""
> > Frankly, I'm tempted to just use sd_journal_send() with 
> > "SYSLOG_IDENTIFIER=sssd[%s]", program_invocation_short_name.
> 
> `sssd[sssd_sudo]` still has a `[` character. That is the concern. If you 
> want, then it could be replaced with `SYSLOG_IDENTIFIER=sssd(%s)` and 
> `program_invocation_short_name` instead of `debug_prg_name`.

Sorry for mistype (bad copy&paste).
I meant `"SYSLOG_IDENTIFIER=%s", program_invocation_short_name` of course.

> But at that point, as you have `sssd(sssd_sudo)` you might as well just use 
> `program_invocation_short_name` (`sssd_sudo`) directly.

Exactly.

> Not sure if this proposal is improving the sitation as a result.

Why? This removes "[]" from journal logs. Doesn't this address the issue?

> > This way we will not change format of logs in files and will use a process 
> > name as an SYSLOG_IDENTIFIER, and I think any reasonable syslog 
> > implementation should be able to cope with it.
> 
> There is a change in any way. 

No. What I propose doesn't affect logs in files.

> > 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.

SSSD has two kind of loggers: 
 1) DEBUG(...) that is managed via `--logger=files|journal|...` option
 2) sss_log() that always logs to system journal (not files) for most important 
messages

In case --logger=journal (1) uses `SSSD_PRG_NAME`
(2) uses`SYSLOG_IDENTIFIER`

I guess there is a reason behind this but didn't yet figure this out.


> Does `be` report the domain in its program name even? The change to process 
> name causes more change than just swapping `[` to `(`.

No, it doesn't. But we have `"SSSD_DOMAIN=%s", domain` there. This might be 
enough (or not, depending on journal being used...)



"""

See the full comment at 
https://github.com/SSSD/sssd/pull/5477#issuecomment-773176858
_______________________________________________
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

Reply via email to