Add a reload add-hoc command

This commit is contained in:
Florent Le Coz
2015-02-24 16:28:30 +01:00
parent 9837f611d9
commit 7115aa3b7f
7 changed files with 41 additions and 7 deletions
+13
View File
@@ -0,0 +1,13 @@
#include <config/config.hpp>
#include <logger/logger.hpp>
void reload_process()
{
// Closing the config will just force it to be reopened the next time
// a configuration option is needed
Config::close();
// Destroy the logger instance, to be recreated the next time a log
// line needs to be written
Logger::instance().reset();
log_debug("Configuration and logger reloaded.");
}