Files
Vladislav Salikov 75b31b5489 Fixed logging codepage.
So it should work on Windows 7.
2025-05-09 14:23:09 +03:00

31 lines
650 B
C++

// wCenterWindow
// CLogger.h
#pragma once
#include <Windows.h>
#include <fstream>
#define MAX_LOGBUFFER_LENGTH 512
class CLogger {
public:
void Out(const wchar_t*, ...);
CLogger(const wchar_t*);
~CLogger();
private:
SYSTEMTIME lt;
CRITICAL_SECTION cs;
wchar_t logTimeBuffer[28] { 0 };
wchar_t logBuffer[MAX_LOGBUFFER_LENGTH] { 0 };
std::ofstream fsLogFile;
std::wstring szAppTitle { 0 };
std::wstring szAppVersion { 0 };
std::wstring szAppPlatform { 0 };
std::wstring szAppTitleVer { 0 };
std::string ConvU16U8(const std::wstring&);
inline wchar_t* GetTimeStamp();
void Init();
};