From 500e1f9892dd41419663e9f72cf47bab5b2aca0b Mon Sep 17 00:00:00 2001 From: Dominick Allen Date: Mon, 23 Sep 2024 00:33:33 -0500 Subject: Saving work. --- src/main.cpp | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) (limited to 'src/main.cpp') 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 +#include +// #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(argc); + static_cast(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); } -- cgit v1.2.3