summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorguidosarducci2017-10-18 06:39:01 +0000
committerguidosarducci2018-03-18 01:41:10 +0000
commitb5204f6d0d8676bc0335e2de9ade225966144d6c (patch)
tree8e551c01edb461c4a393a08f2b7de23eaeb045e2
parentea47a982ac60db86cae148fb7edf8416d1ca2288 (diff)
downloadtelephony-b5204f6d0d8676bc0335e2de9ade225966144d6c.tar.gz
siproxd: improve syslog messages
Use explicit ident string ("siproxd") instead of NULL, as the latter is not guaranteed to prepend the program name (e.g. unspecified in POSIX), and may result in syslog messages identified only by PID. Use consistent facility (LOG_DAEMON) across openlog() and syslog() calls. Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
-rw-r--r--net/siproxd/patches/010-syslog-msg.patch20
1 files changed, 20 insertions, 0 deletions
diff --git a/net/siproxd/patches/010-syslog-msg.patch b/net/siproxd/patches/010-syslog-msg.patch
new file mode 100644
index 0000000..0e00e0b
--- /dev/null
+++ b/net/siproxd/patches/010-syslog-msg.patch
@@ -0,0 +1,20 @@
+--- a/src/log.c
++++ b/src/log.c
+@@ -77,7 +77,7 @@
+ static pthread_mutex_t log_mutex = PTHREAD_MUTEX_INITIALIZER;
+
+ void log_init(void) {
+- openlog(NULL,LOG_NDELAY|LOG_PID,LOG_DAEMON);
++ openlog("siproxd",LOG_NDELAY|LOG_PID,LOG_DAEMON);
+ }
+
+ void log_end(void) {
+@@ -257,7 +257,7 @@
+ va_copy(ap_copy, ap);
+ vsnprintf(outbuf, sizeof(outbuf), format, ap_copy);
+ va_end(ap_copy);
+- syslog(LOG_USER|level, "%s:%i %s%s", file, line, label, outbuf);
++ syslog(LOG_DAEMON|level, "%s:%i %s%s", file, line, label, outbuf);
+ return;
+ }
+