mirror of
https://github.com/SlimeVR/SlimeVR-Server.git
synced 2026-11-23 18:41:24 -08:00
22 lines
412 B
C++
22 lines
412 B
C++
#include "logger.hpp"
|
|
#include "paths.hpp"
|
|
|
|
#ifdef _WIN32
|
|
#define WIN32_MEAN_AND_LEAN
|
|
#include <Windows.h>
|
|
#endif
|
|
|
|
Logger::Logger()
|
|
: log_stream(Paths::getLogPath() / "slimevr-bindings-provider.log",
|
|
std::ios::out | std::ios::app)
|
|
#ifdef _WIN32
|
|
, should_log_to_std_streams(GetConsoleWindow() != nullptr)
|
|
#endif
|
|
{
|
|
}
|
|
|
|
Logger &Logger::get() {
|
|
static Logger logger;
|
|
return logger;
|
|
}
|