summaryrefslogtreecommitdiff
path: root/src/log.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/log.c')
-rw-r--r--src/log.c15
1 files changed, 15 insertions, 0 deletions
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");
+ }
+}