sysklogd ignores my log facilities
Posted
by
Synther Lawrence
on Stack Overflow
See other posts from Stack Overflow
or by Synther Lawrence
Published on 2013-09-25T14:50:06Z
Indexed on
2013/10/30
15:54 UTC
Read the original article
Hit count: 178
I'm using sysklogd 1.5.5. All I want is to get local0
entries in /var/log/vr
file.
My conf:
*.*;local0.none /var/log/messages
local0.* /var/log/vr
When I do
logger -p local0.info "local0 test from logger"
the message appear in /var/log/vr
file. That's ok. But the following sends message to /var/log/messages
instead of /var/log/vr
:
#include <stdlib.h>
#include <syslog.h>
int main(int argc, char const* argv[])
{
openlog(NULL, LOG_PID, LOG_LOCAL0);
syslog(LOG_INFO, "local0 test from app\n");
closelog();
return 0;
}
Where am I wrong?
© Stack Overflow or respective owner