CS2-Kit
C++23 library for CS2 Metamod:Source plugin development
Loading...
Searching...
No Matches
ConsoleLogger.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <CS2Kit/Core/ILogger.hpp>
4#include <string>
5
6namespace CS2Kit::Core
7{
8
9/**
10 * @brief Default console logger implementation using HL2SDK's ConColorMsg.
11 * Created automatically by CS2Kit::Initialize() when no custom logger is provided.
12 */
13class ConsoleLogger : public ILogger
14{
15public:
16 void SetPrefix(const char* prefix) { _prefix = prefix; }
17
18 void Info(const std::string& message) override;
19 void Warn(const std::string& message) override;
20 void Error(const std::string& message) override;
21
22private:
23 const char* _prefix = "CS2Kit";
24};
25
26} // namespace CS2Kit::Core
Default console logger implementation using HL2SDK's ConColorMsg. Created automatically by CS2Kit::In...
void Error(const std::string &message) override
void Warn(const std::string &message) override
void Info(const std::string &message) override
void SetPrefix(const char *prefix)