r5sdk/r5dev/core/logdef.h
Kawe Mazidjatari 7dfef9c9c8 CCrashHandler and logging improvements
* CCrashHandler now calls the crashmsg executable to display the error to the user.
* Logs are now placed into directories named to the current time to avoid overwriting them or having 2 instances of the game writing to the same logs.
2022-12-27 02:28:43 +01:00

18 lines
663 B
C++

#pragma once
constexpr int SPDLOG_MAX_SIZE = 10 * 1024 * 1024; // Sets number of bytes before rotating logger.
constexpr int SPDLOG_NUM_FILE = 0; // Sets number of files to rotate to.
inline bool g_bSpdLog_UseAnsiClr = false;
inline bool g_bSpdLog_PostInit = false;
inline string g_svLogSessionDirectory;
//-------------------------------------------------------------------------
// IMGUI CONSOLE SINK |
inline std::ostringstream g_spd_sys_w_oss;
inline auto g_spd_sys_p_ostream_sink = std::make_shared<spdlog::sinks::ostream_sink_st>(g_spd_sys_w_oss);
void SpdLog_Init(void);
void SpdLog_PostInit(void);