for single binaries use progname as the log id.

This commit is contained in:
Joris Vink 2016-07-06 22:02:10 +02:00
parent 9abf15a498
commit d2c30fd70b
1 changed files with 8 additions and 1 deletions

View File

@ -63,8 +63,15 @@ kore_debug_internal(char *file, int line, const char *fmt, ...)
void
kore_log_init(void)
{
#if defined(KORE_SINGLE_BINARY)
extern const char *__progname;
const char *name = __progname;
#else
const char *name = "kore";
#endif
if (!foreground)
openlog("kore", LOG_NDELAY | LOG_PID, LOG_DAEMON);
openlog(name, LOG_NDELAY | LOG_PID, LOG_DAEMON);
}
void