aboutsummaryrefslogtreecommitdiffstats
path: root/src/init.cpp
diff options
context:
space:
mode:
authorSaturn&Eric <[email protected]>2022-05-08 13:14:24 +0000
committerGitHub <[email protected]>2022-05-08 13:14:24 +0000
commitf722eec9a898c97e233619a50f6f1a94fef6f94c (patch)
tree26757206ff3e139a10968bd8ae6147ca1a1182a7 /src/init.cpp
parentMerge pull request #50 from saturneric/develop-2.0.5 (diff)
parentdoc: update translate document. (diff)
downloadGpgFrontend-f722eec9a898c97e233619a50f6f1a94fef6f94c.tar.gz
GpgFrontend-f722eec9a898c97e233619a50f6f1a94fef6f94c.zip
Merge pull request #54 from saturneric/develop-2.0.6v2.0.6
Develop 2.0.6
Diffstat (limited to 'src/init.cpp')
-rw-r--r--src/init.cpp54
1 files changed, 0 insertions, 54 deletions
diff --git a/src/init.cpp b/src/init.cpp
index f5bbb750..7aefc00f 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -26,8 +26,6 @@
*
*/
-#include <boost/date_time.hpp>
-
#include "core/function/GlobalSettingStation.h"
/**
@@ -52,58 +50,6 @@ std::vector<std::filesystem::path> get_files_of_directory(
}
/**
- * @brief setup logging system and do proper initialization
- *
- */
-void init_logging() {
- using namespace boost::posix_time;
- using namespace boost::gregorian;
-
- ptime now = second_clock::local_time();
-
- el::Loggers::addFlag(el::LoggingFlag::AutoSpacing);
- el::Configurations defaultConf;
- defaultConf.setToDefault();
- el::Loggers::reconfigureLogger("default", defaultConf);
-
- // apply settings
- defaultConf.setGlobally(el::ConfigurationType::Format,
- "%datetime %level %func %msg");
-
- // get the log directory
- auto logfile_path =
- (GpgFrontend::GlobalSettingStation::GetInstance().GetLogDir() /
- to_iso_string(now));
- logfile_path.replace_extension(".log");
- defaultConf.setGlobally(el::ConfigurationType::Filename,
- logfile_path.u8string());
-
- el::Loggers::reconfigureLogger("default", defaultConf);
-
- LOG(INFO) << _("log file path") << logfile_path;
-}
-
-/**
- * @brief load all certificates from the given path
- * and add them to the given certificate store in GlobalSettingStation
- */
-void init_certs() {
- // get the certificate directory
- auto cert_file_paths = get_files_of_directory(
- GpgFrontend::GlobalSettingStation::GetInstance().GetCertsDir());
-
- // get the instance of the GlobalSettingStation
- auto& _instance = GpgFrontend::GlobalSettingStation::GetInstance();
- for (const auto& cert_file_path : cert_file_paths) {
- // add the certificate to the store
- _instance.AddRootCert(cert_file_path);
- }
-
- // show the number of loaded certificates
- LOG(INFO) << _("root certs loaded") << _instance.GetRootCerts().size();
-}
-
-/**
* @brief setup the locale and load the translations
*
*/