refactoring log class

This commit is contained in:
georgemoralis 2023-08-13 16:54:56 +03:00
parent ca291b6573
commit 04e9366cb8
12 changed files with 105 additions and 11 deletions

17
src/Util/log.cpp Normal file
View file

@ -0,0 +1,17 @@
#include <vector>
#include <spdlog/common.h>
#include <spdlog/sinks/stdout_color_sinks.h>
namespace logging {
std::vector<spdlog::sink_ptr> sinks;
int init(bool use_stdout) {
sinks.clear();//clear existing sinks
if (use_stdout)//if we use stdout window then init it as well
sinks.push_back(std::make_shared<spdlog::sinks::stdout_color_sink_mt>());
return 0;//all ok
}
}