mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
RCON upgrade with additional logging system improvements: * Netconsole's can now log received messages in color, even when the RCON server has ANSI colors disabled; logs are fully composed locally. * RCON server now also sends the log type over the wire, along with the (already existing) context. * SDK logging code is now shared with the standalone netconsole application. * Improved logging readability for the standalone netconsole application.
23 lines
804 B
C++
23 lines
804 B
C++
#pragma once
|
|
|
|
constexpr int SPDLOG_MAX_SIZE = 10 * 1024 * 1024; // Sets number of bytes before rotating logger.
|
|
constexpr int SPDLOG_NUM_FILE = 512; // Sets number of files to rotate to.
|
|
|
|
inline bool g_bSpdLog_UseAnsiClr = false;
|
|
inline bool g_bSpdLog_PostInit = false;
|
|
|
|
inline string g_svLogSessionDirectory;
|
|
|
|
extern std::shared_ptr<spdlog::logger> g_TermLogger;
|
|
extern std::shared_ptr<spdlog::logger> g_ImGuiLogger;
|
|
|
|
//-------------------------------------------------------------------------
|
|
// IMGUI CONSOLE SINK |
|
|
inline std::ostringstream g_LogStream;
|
|
inline auto g_LogSink = std::make_shared<spdlog::sinks::ostream_sink_st>(g_LogStream);
|
|
|
|
void SpdLog_Init(void);
|
|
void SpdLog_Create(void);
|
|
void SpdLog_PostInit(void);
|
|
void SpdLog_Shutdown(void);
|