aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/GpgFrontendUIInit.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/ui/GpgFrontendUIInit.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 '')
-rw-r--r--src/ui/GpgFrontendUIInit.cpp (renamed from src/ui/mail/ReceiveMailDialog.h)66
1 files changed, 25 insertions, 41 deletions
diff --git a/src/ui/mail/ReceiveMailDialog.h b/src/ui/GpgFrontendUIInit.cpp
index 2ccb2664..82746551 100644
--- a/src/ui/mail/ReceiveMailDialog.h
+++ b/src/ui/GpgFrontendUIInit.cpp
@@ -26,55 +26,39 @@
*
*/
-#ifndef GPGFRONTEND_RECEIVEMAILDIALOG_H
-#define GPGFRONTEND_RECEIVEMAILDIALOG_H
+#include "GpgFrontendUIInit.h"
-#include "ui/GpgFrontendUI.h"
+#include "core/function/GlobalSettingStation.h"
-class Ui_ReceiveMailDialog;
-
-namespace vmime::net {
-class folder;
-};
+// init easyloggingpp library
+INITIALIZE_EASYLOGGINGPP
namespace GpgFrontend::UI {
-class IMAPFolder;
+void init_logging() {
+ using namespace boost::posix_time;
+ using namespace boost::gregorian;
-/**
- * @brief
- *
- */
-class ReceiveMailDialog : public QDialog {
- Q_OBJECT
- public:
- /**
- * @brief Construct a new Receive Mail Dialog object
- *
- * @param parent
- */
- explicit ReceiveMailDialog(QWidget* parent);
+ ptime now = second_clock::local_time();
- private slots:
- /**
- * @brief
- *
- */
- void slot_refresh_data();
+ el::Loggers::addFlag(el::LoggingFlag::AutoSpacing);
+ el::Configurations defaultConf;
+ defaultConf.setToDefault();
+ el::Loggers::reconfigureLogger("default", defaultConf);
- private:
- std::shared_ptr<Ui_ReceiveMailDialog> ui_; ///<
- std::vector<std::shared_ptr<IMAPFolder>> folders_; ///<
+ // apply settings
+ defaultConf.setGlobally(el::ConfigurationType::Format,
+ "%datetime %level %func %msg");
- /**
- * @brief
- *
- * @param parent_folder
- */
- void list_sub_folders(IMAPFolder* parent_folder,
- const std::shared_ptr<vmime::net::folder>&);
-};
+ // get the log directory
+ auto logfile_path =
+ (GlobalSettingStation::GetInstance().GetLogDir() / to_iso_string(now));
+ logfile_path.replace_extension(".log");
+ defaultConf.setGlobally(el::ConfigurationType::Filename,
+ logfile_path.u8string());
-} // namespace GpgFrontend::UI
+ el::Loggers::reconfigureLogger("default", defaultConf);
-#endif // GPGFRONTEND_RECEIVEMAILDIALOG_H
+ LOG(INFO) << _("log file path") << logfile_path;
+}
+} // namespace GpgFrontend::UI \ No newline at end of file