diff --git a/obexd/client/main.c b/obexd/client/main.c
index 74db15e..20d56d2 100644
--- a/obexd/client/main.c
+++ b/obexd/client/main.c
event_loop = g_main_loop_new(NULL, FALSE);
- __obex_log_init(option_debug, !option_stderr);
+ __obex_log_init("obex-client", option_debug, !option_stderr);
DBG("Entering main loop");
diff --git a/obexd/src/log.c b/obexd/src/log.c
index 39489a2..baa57c5 100644
--- a/obexd/src/log.c
+++ b/obexd/src/log.c
desc->flags |= OBEX_DEBUG_FLAG_PRINT;
}
-void __obex_log_init(const char *debug, int detach)
+void __obex_log_init(const char *label, const char *debug, int detach)
{
int option = LOG_NDELAY | LOG_PID;
struct obex_debug_desc *desc;
if (!detach)
option |= LOG_PERROR;
- openlog("obexd", option, LOG_DAEMON);
+ openlog(label, option, LOG_DAEMON);
- syslog(LOG_INFO, "OBEX daemon %s", VERSION);
+ syslog(LOG_INFO, "%s daemon %s", label, VERSION);
}
void __obex_log_cleanup(void)
diff --git a/obexd/src/log.h b/obexd/src/log.h
index 1bf1b05..e322565 100644
--- a/obexd/src/log.h
+++ b/obexd/src/log.h
void obex_debug(const char *format, ...) __attribute__((format(printf, 1, 2)));
-void __obex_log_init(const char *debug, int detach);
+void __obex_log_init(const char *label, const char *debug, int detach);
void __obex_log_cleanup(void);
void __obex_log_enable_debug(void);
diff --git a/obexd/src/main.c b/obexd/src/main.c
index 14e7d16..1e78615 100644
--- a/obexd/src/main.c
+++ b/obexd/src/main.c
exit(EXIT_FAILURE);
}
- __obex_log_init(option_debug, option_detach);
+ __obex_log_init("obexd", option_debug, option_detach);
DBG("Entering main loop");