[systemd-bugs] [Bug 69934] New: syslog()-calls just before a program exit are not be recorded in the journal DB
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Sun Sep 29 11:43:24 PDT 2013
https://bugs.freedesktop.org/show_bug.cgi?id=69934
Priority: high
Bug ID: 69934
Assignee: systemd-bugs at lists.freedesktop.org
Summary: syslog()-calls just before a program exit are not be
recorded in the journal DB
QA Contact: systemd-bugs at lists.freedesktop.org
Severity: major
Classification: Unclassified
OS: Linux (All)
Reporter: martin at thesofty.de
Hardware: x86-64 (AMD64)
Status: NEW
Version: unspecified
Component: general
Product: systemd
When I have a statement like this in a C program
if (some error) {
syslog(LOG_ERR | LOG_USER,"some error description"\n);
exit(EXIT_FAILURE);
}
the error description will not be found in the journal DB.
Even a closelog()-call before exit() doesn't help.
The only way to get the description recorded is a code snippet like this:
if (some error) {
syslog(LOG_ERR | LOG_USER,"some error description"\n);
sleep(1);
exit(EXIT_FAILURE);
}
When using syslog-ng instead
if (some error) {
syslog(LOG_ERR | LOG_USER,"some error description"\n);
exit(EXIT_FAILURE);
}
records the error message without any problems in /var/log/user.log
I'm using
Arch Linux x86-64
Kernel 3.11.1-1
Systemd 207
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-bugs/attachments/20130929/d0db14cc/attachment.html>
More information about the systemd-bugs
mailing list