From 649b2c06830fe08cc9db5f6fdf6f05de96ed1a0b Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Tue, 22 Dec 2009 12:57:49 +0100 Subject: log: add function shutdown_logging(). Michael --- src/log.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/log.c') diff --git a/src/log.c b/src/log.c index 5d669b4..3b5c706 100644 --- a/src/log.c +++ b/src/log.c @@ -281,3 +281,18 @@ int setup_logging (void) done: return ret; } + +/** + * Stop the logging subsystem. + */ +void shutdown_logging (void) +{ + if (config.logf_name) { + close_log_file (); + } else if (config.syslog) { + closelog (); + } else { + fprintf (stderr, "error - shutdown_logging called while " + " logging not configured yet\n"); + } +} -- cgit v1.2.3