diff options
Diffstat (limited to 'hcid/logging.c')
-rw-r--r-- | hcid/logging.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/hcid/logging.c b/hcid/logging.c index e478a60e..f25dc10a 100644 --- a/hcid/logging.c +++ b/hcid/logging.c @@ -79,3 +79,15 @@ void disable_debug() { debug_enabled = 0; } + +void start_logging(const char *ident, const char *message) +{ + openlog(ident, LOG_PID | LOG_NDELAY | LOG_PERROR, LOG_DAEMON); + + info(message); +} + +void stop_logging(void) +{ + closelog(); +} |