summaryrefslogtreecommitdiff
path: root/louloulibs/utils/reload.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'louloulibs/utils/reload.cpp')
m---------louloulibs0
-rw-r--r--louloulibs/utils/reload.cpp13
2 files changed, 13 insertions, 0 deletions
diff --git a/louloulibs b/louloulibs
deleted file mode 160000
-Subproject 0f3c1183e2bf0941ae2bffd3f31577bce4f3001
diff --git a/louloulibs/utils/reload.cpp b/louloulibs/utils/reload.cpp
new file mode 100644
index 0000000..6600c75
--- /dev/null
+++ b/louloulibs/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.");
+}