VoltMod
C++23 framework for CS2 server plugins
Loading...
Searching...
No Matches
ConsoleLogger.hpp
Go to the documentation of this file.
1#pragma once
2
4#include <string>
5
6namespace VoltMod
7{
8
9/**
10 * @brief The default handler: tier0 `ConColorMsg`/`Msg`, one colour per level.
11 *
12 * The returned handler owns a copy of @p prefix and reaches the engine, so it may only be invoked
13 * on the game thread - which is exactly the contract @ref VoltMod::Log::Handler already states.
14 */
16
17} // namespace VoltMod
std::function< void(LogLevel level, std::string_view message)> Handler
Where log lines end up.
Definition Log.hpp:30
Log::Handler MakeConsoleHandler(std::string prefix)
The default handler: tier0 ConColorMsg/Msg, one colour per level.
static std::string ReadFile(const std::filesystem::path &path)
Definition Loader.cpp:56