summaryrefslogtreecommitdiff
path: root/src/main.cpp
blob: 8beda5126ba5d1d5811027889cb0690c4a3a5392 (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
#include <spdlog/cfg/env.h>
#include <spdlog/spdlog.h>

#include "bookmouse.hpp"

#include <libfud.hpp>

void setupLogging()
{
    spdlog::cfg::load_env_levels();

    spdlog::set_pattern("[%H:%M:%S %z] [%^%L%$] [thread %t] %v");
    spdlog::set_level(spdlog::level::debug);
}

int main(int argc, char* argv[])
{
    static_cast<void>(argc);
    static_cast<void>(argv);

    setupLogging();

    auto result = fud::getEnv("HOME");
    if (result.isError()) {
        spdlog::error("Error getting home variable");
    } else {
        auto home = result.getOkay();
        spdlog::info("Home is {}", home.c_str());
    }

    bookmouse::Bookmouse bookmouse{};
    return bookmouse.run();
}