aboutsummaryrefslogtreecommitdiffstats
path: root/src/init.cpp
diff options
context:
space:
mode:
authorSaturn&Eric <[email protected]>2022-05-20 19:13:55 +0000
committerGitHub <[email protected]>2022-05-20 19:13:55 +0000
commit306cc5b41af9596875c2999af638eaa35899e404 (patch)
tree6d8d5b3cdb35e79527d33c63d4e69995f9c3f2df /src/init.cpp
parentMerge pull request #65 from saturneric/develop-2.0.8 (diff)
parentfix(ui): there is possible null pointer dereference (diff)
downloadGpgFrontend-306cc5b41af9596875c2999af638eaa35899e404.tar.gz
GpgFrontend-306cc5b41af9596875c2999af638eaa35899e404.zip
Merge pull request #66 from saturneric/develop-2.0.8
Develop 2.0.8.2
Diffstat (limited to 'src/init.cpp')
-rw-r--r--src/init.cpp34
1 files changed, 15 insertions, 19 deletions
diff --git a/src/init.cpp b/src/init.cpp
index 2f4955f5..c872170e 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -26,25 +26,21 @@
*
*/
+#include "GpgFrontend.h"
+#include "GpgFrontendBuildInfo.h"
#include "core/function/GlobalSettingStation.h"
-/**
- * @brief Get the files of a given directory
- *
- * @param _path target directory
- * @return std::vector<std::filesystem::path>
- */
-std::vector<std::filesystem::path> get_files_of_directory(
- const std::filesystem::path& _path) {
- namespace fs = std::filesystem;
- std::vector<fs::path> path_list;
- if (!_path.empty()) {
- fs::recursive_directory_iterator end;
+void init_logging_system() {
+ el::Loggers::addFlag(el::LoggingFlag::AutoSpacing);
+ el::Configurations defaultConf;
+ defaultConf.setToDefault();
+
+ // apply settings
+ defaultConf.setGlobally(el::ConfigurationType::Format,
+ "%datetime %level [main] %func %msg");
+ // apply settings no written to file
+ defaultConf.setGlobally(el::ConfigurationType::ToFile, "false");
- for (fs::recursive_directory_iterator i(_path); i != end; ++i) {
- const fs::path cp = (*i);
- path_list.push_back(cp);
- }
- }
- return path_list;
-} \ No newline at end of file
+ // set the logger
+ el::Loggers::reconfigureLogger("default", defaultConf);
+}