log: add function shutdown_logging().

Michael
This commit is contained in:
Michael Adam 2009-12-22 12:57:49 +01:00
parent 479562ad2b
commit 649b2c0683
2 changed files with 16 additions and 0 deletions

View File

@ -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");
}
}

View File

@ -118,5 +118,6 @@ extern void set_log_level (int level);
extern void send_stored_logs (void);
extern int setup_logging (void);
extern void shutdown_logging (void);
#endif