#include #include #include "bookmouse.hpp" #include 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(argc); static_cast(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(); } 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); }