feat: add logger

This commit is contained in:
k0t9i
2023-10-17 20:20:25 +04:00
parent 03e61a9b9a
commit ab85800275
12 changed files with 248 additions and 1 deletions

View File

@@ -0,0 +1,19 @@
#pragma once
#include <Windows.h>
#include "Domain/Logger/LogChannel.h"
using namespace L2Bot::Domain;
class OutputDebugLogChannel : public Logger::LogChannel
{
public:
OutputDebugLogChannel(const std::vector<Logger::LogLevel> levels) : Logger::LogChannel(levels) {};
virtual ~OutputDebugLogChannel() = default;
protected:
void DoSendToChannel(const std::wstring& logEntry) override
{
OutputDebugStringW((GetCurrentDateTime() + logEntry).c_str());
}
};