aboutsummaryrefslogtreecommitdiffstats
path: root/src/init.cpp
diff options
context:
space:
mode:
authorSaturneric <[email protected]>2022-05-07 17:01:29 +0000
committerSaturneric <[email protected]>2022-05-07 17:01:29 +0000
commitf1a2ce4bcb7d46981d1fc471e517709f076d9365 (patch)
treee9d42769dccaf452ba14394e0e0fe574fcd086dd /src/init.cpp
parentfix: add openssl dependency for windows ci (diff)
downloadGpgFrontend-f1a2ce4bcb7d46981d1fc471e517709f076d9365.tar.gz
GpgFrontend-f1a2ce4bcb7d46981d1fc471e517709f076d9365.zip
refactor: develop 2.0.6 start
1. delete smtp ability 2. change libs link type to dramatic
Diffstat (limited to '')
-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
*
*/