log: add function shutdown_logging().
Michael
This commit is contained in:
parent
479562ad2b
commit
649b2c0683
15
src/log.c
15
src/log.c
@ -281,3 +281,18 @@ int setup_logging (void)
|
|||||||
done:
|
done:
|
||||||
return ret;
|
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");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user