mirror of
https://github.com/SlimeVR/SlimeVR-Server.git
synced 2026-11-26 03:46:28 -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;
|
|
}
|