diff options
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 32 |
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); } |