Files
wCenterWindow-1/wCenterWindow/CLogger.h
dreamforceinc 29ac0eff94 Removed license info from source and header files.
Also edited LICENSE and README.md files.
2024-02-29 18:02:06 +03:00

30 lines
594 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::wofstream fsLogFile;
std::wstring szAppTitle{ 0 };
std::wstring szAppVersion{ 0 };
std::wstring szAppPlatform{ 0 };
std::wstring szAppTitleVer{ 0 };
inline wchar_t* GetTimeStamp();
void Init();
};