-
Notifications
You must be signed in to change notification settings - Fork 70
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
capnslog: set SYSLOG_IDENTIFIER for journal #43
Conversation
@@ -55,7 +55,8 @@ func (j *journaldFormatter) Format(pkg string, l LogLevel, _ int, entries ...int | |||
} | |||
msg := fmt.Sprint(entries...) | |||
tags := map[string]string{ | |||
"PACKAGE": pkg, | |||
"PACKAGE": pkg, | |||
"SYSLOG_IDENTIFIER": os.Args[0], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
basename()
Fixes coreos#40. I think it's reasonable to just set this by default rather than needing to expose it to users. References: http://www.freedesktop.org/software/systemd/man/systemd.journal-fields.html#SYSLOG_FACILITY= http://linux.die.net/man/3/program_invocation_short_name
updayted |
LGTM |
capnslog: set SYSLOG_IDENTIFIER for journal
might it be better to use https://github.com/kardianos/osext for this? |
Maybe it would be better to use /proc/self/exe, but I'd rather not import On Sat, Oct 24, 2015 at 3:44 PM, Nick Owens notifications@github.com
|
Update to catch coreos/pkg#43 which should fix SYSLOG_IDENTIFIER getting set when etcd is logging to the journal.
Update to catch coreos/pkg#43 which should fix SYSLOG_IDENTIFIER getting set when etcd is logging to the journal.
Update to catch coreos/pkg#43 which should fix SYSLOG_IDENTIFIER getting set when etcd is logging to the journal.
Fixes #40. I think it's reasonable to just set this by default rather than
needing to expose it to users.
References:
http://www.freedesktop.org/software/systemd/man/systemd.journal-fields.html#SYSLOG_FACILITY=
http://linux.die.net/man/3/program_invocation_short_name