summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorDominick Allen <djallen@librehumanitas.org>2024-09-23 00:33:33 -0500
committerDominick Allen <djallen@librehumanitas.org>2024-09-23 00:33:33 -0500
commit500e1f9892dd41419663e9f72cf47bab5b2aca0b (patch)
treea0709693d5317a6b89cdda7ac3143886b93552f4 /src/main.cpp
parentfa4b4097d3283e1d6e6376c70910e245f0b1f6ec (diff)
Saving work.
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp32
1 files changed, 29 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp
index bac3ff2..f933426 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1,9 +1,23 @@
-#include "main_window.hpp"
+#include <spdlog/cfg/env.h>
+#include <spdlog/spdlog.h>
+// #include "main_window.hpp"
+
+void setupLogging()
+{
+ spdlog::cfg::load_env_levels();
+
+ spdlog::set_pattern("[%H:%M:%S %z] [%^%L%$] [thread %t] %v");
+}
int main(int argc, char* argv[])
{
- QApplication app{argc, argv};
- getsuyomi::GetsuyomiApp getsuyomi{};
+ static_cast<void>(argc);
+ static_cast<void>(argv);
+
+ setupLogging();
+
+#if 0
+ bookmouse::BookmouseApp bookmouse{};
QCommandLineParser parser;
parser.setApplicationDescription(QApplication::translate("main", "A comic book and manga reader"));
@@ -13,4 +27,16 @@ int main(int argc, char* argv[])
parser.process(app);
return app.exec();
+#endif
+ return 0;
+}
+
+void load_levels_example() {
+ // Set the log level to "info" and mylogger to "trace":
+ // SPDLOG_LEVEL=info,mylogger=trace && ./example
+ spdlog::cfg::load_env_levels();
+ // or from command line:
+ // ./example SPDLOG_LEVEL=info,mylogger=trace
+ // #include "spdlog/cfg/argv.h" // for loading levels from argv
+ // spdlog::cfg::load_argv_levels(args, argv);
}