Refactor project structure

This commit is contained in:
2023-06-09 14:45:44 +02:00
parent ae61cccb70
commit cf7d2ee7bf
39 changed files with 85 additions and 84 deletions

17
src/util/log.cpp Normal file
View File

@@ -0,0 +1,17 @@
#include "log.h"
#include <spdlog/cfg/env.h>
void Log::initialize()
{
spdlog::set_pattern("[%H:%M:%S.%e] [%^%l%$] %v");
#ifndef NDEBUG
spdlog::set_level(spdlog::level::debug);
#else
spdlog::set_level(spdlog::level::warn);
#endif
// Override level when running with environment variable.
spdlog::cfg::load_env_levels();
}