[Asterisk-code-review] logger: Add PID to syslog messages. (asterisk[13])

Alexei Gradinari asteriskteam at digium.com
Fri May 13 09:56:49 CDT 2016


Alexei Gradinari has posted comments on this change.

Change subject: logger: Add PID to syslog messages.
......................................................................


Patch Set 2:

Kevin,
I just tested 2 calls of openlog on Slackware.
Both facility were written to corresponding file.
You can test it by yourself
=== /etc/syslogd.conf ===
local3.* -/var/log/local3.log
local4.* -/var/log/local4.log
======
=== stest.c ===
#include <syslog.h>

int main(int argc, char **argv) {
    openlog("test", LOG_PID, LOG_LOCAL3);
    openlog("test", LOG_PID, LOG_LOCAL4);

    syslog(LOG_LOCAL3|LOG_ERR, "error:local3");
    syslog(LOG_LOCAL4|LOG_WARNING, "warning:local4");
}
======
# make stest
./stest
# cat /var/log/local3.log 
May 13 10:44:14 asterisk-test test[6996]: error:local3
# cat /var/log/local4.log  
May 13 10:44:14 asterisk-test test[6996]: warning:local4

Tested on 
Slackware 14.1 i686/syslogd 1.5.0
Slackware 14.1 x86_64/rsyslogd 8.16.0

-- 
To view, visit https://gerrit.asterisk.org/2774
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie2d43b0652e59b7ac319a7dba94501540d70ba36
Gerrit-PatchSet: 2
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Alexei Gradinari <alex2grad at gmail.com>
Gerrit-Reviewer: Alexei Gradinari <alex2grad at gmail.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-HasComments: No



More information about the asterisk-code-review mailing list