diff options
author | Konstantin Tokarev <ktokarev@smartlabs.tv> | 2015-12-01 21:54:03 +0300 |
---|---|---|
committer | Konstantin Tokarev <ktokarev@smartlabs.tv> | 2015-12-15 16:43:29 +0300 |
commit | c59827334cdd9e2e25ae3b75d73045d1fca3fa69 (patch) | |
tree | b078cc7a8b6c74f435c0598410fa9c2f229397d0 | |
parent | 2d6bbf341d0554fb33179dfe7757b6e22f993fe6 (diff) |
Allow setting syslog identifier via startsyslog().
-rw-r--r-- | dbutil.c | 4 | ||||
-rw-r--r-- | dbutil.h | 2 | ||||
-rw-r--r-- | svr-main.c | 2 |
3 files changed, 4 insertions, 4 deletions
@@ -84,9 +84,9 @@ int debug_trace = 0; #endif #ifndef DISABLE_SYSLOG -void startsyslog() { +void startsyslog(const char *ident) { - openlog(PROGNAME, LOG_PID, LOG_AUTHPRIV); + openlog(ident, LOG_PID, LOG_AUTHPRIV); } #endif /* DISABLE_SYSLOG */ @@ -31,7 +31,7 @@ #include "queue.h" #ifndef DISABLE_SYSLOG -void startsyslog(); +void startsyslog(const char *ident); #endif #ifdef __GNUC__ @@ -367,8 +367,8 @@ static void commonsetup() { struct sigaction sa_chld; #ifndef DISABLE_SYSLOG - startsyslog(); if (opts.usingsyslog) { + startsyslog(PROGNAME); } #endif |