Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

syslog "progname" uses a full path rather than a basename #384

Closed
sysmonk opened this issue Sep 10, 2021 · 1 comment · Fixed by #389
Closed

syslog "progname" uses a full path rather than a basename #384

sysmonk opened this issue Sep 10, 2021 · 1 comment · Fixed by #389
Labels

Comments

@sysmonk
Copy link
Contributor

sysmonk commented Sep 10, 2021

Howdy,

Finally looking at upgrading our log-courier installations (2.0.6 -> 2.6.2).
We've got a rsyslog configuration, which sends 'log-courier' logs to a specific log file. Something like this:

:programname,contains,"log-courier" /var/log/log-courier.log
&~

But after upgrading this stopped working. The issue is that the progname is now a full path:
Before:

Sep  9 12:59:43 stankea log-courier[15511]: Loading registrar data from /var/run//.log-courier

Now:

Sep  9 13:50:54 stankea /usr/local/bin/log-courier[26304]: Loading registrar data from /var/run//.log-courier

And based on the documentation, the slash is a terminator, so the /usr/local/bin/log-courier becomes an empty progname:
Docs:

programname
the “static” part of the tag, as defined by BSD syslogd. For example, when TAG is “named[12345]”, programname is “named”.

Precisely, the programname is terminated by either (whichever occurs first):

end of tag
nonprintable character
‘:’
‘[‘
‘/’

Technically, it's probably not a bug, but a feature request :) Is it possible to have the log use basename($0) rather than the full path to the binary?

@driskell
Copy link
Owner

Currently testing from the log-courier2-testing repository and if all good overnight I will tag up a release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants