summaryrefslogtreecommitdiff
path: root/src/main.cpp
blob: f93342652d45139db5802b0433999b3f773bf6ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#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[])
{
    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"));
    parser.addHelpOption();
    parser.addVersionOption();

    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);
}