From 7115aa3b7f22f95e5e614ffc74c467844c08d965 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Tue, 24 Feb 2015 16:28:30 +0100 Subject: Add a reload add-hoc command --- src/utils/reload.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 src/utils/reload.cpp (limited to 'src/utils/reload.cpp') 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 +#include + +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."); +} -- cgit v1.2.3