diff options
author | Florent Le Coz <louiz@louiz.org> | 2015-02-24 16:28:30 +0100 |
---|---|---|
committer | Florent Le Coz <louiz@louiz.org> | 2015-02-24 16:28:30 +0100 |
commit | 7115aa3b7f22f95e5e614ffc74c467844c08d965 (patch) | |
tree | 05e3b4efd07a602591d9828d5f24fab6eb4bf86f /src/utils/reload.cpp | |
parent | 9837f611d97bccdb4bf46f042120c3cb8d3fe907 (diff) | |
download | biboumi-7115aa3b7f22f95e5e614ffc74c467844c08d965.tar.gz biboumi-7115aa3b7f22f95e5e614ffc74c467844c08d965.tar.bz2 biboumi-7115aa3b7f22f95e5e614ffc74c467844c08d965.tar.xz biboumi-7115aa3b7f22f95e5e614ffc74c467844c08d965.zip |
Add a reload add-hoc command
Diffstat (limited to 'src/utils/reload.cpp')
-rw-r--r-- | src/utils/reload.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/utils/reload.cpp b/src/utils/reload.cpp new file mode 100644 index 0000000..6600c75 --- /dev/null +++ b/src/utils/reload.cpp @@ -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."); +} |