mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
The destruction of these crashed due to dereferencing an invalid pointer. Not making them inline fixes the problem. This problem only occurred on debug builds, other build configurations were not affected.
31 lines
1.1 KiB
C++
31 lines
1.1 KiB
C++
#pragma once
|
|
|
|
#include <sstream>
|
|
#include "thirdparty/spdlog/spdlog.h"
|
|
#include "thirdparty/spdlog/async.h"
|
|
#include "thirdparty/spdlog/sinks/ostream_sink.h"
|
|
#include "thirdparty/spdlog/sinks/basic_file_sink.h"
|
|
#include "thirdparty/spdlog/sinks/stdout_sinks.h"
|
|
#include "thirdparty/spdlog/sinks/stdout_color_sinks.h"
|
|
#include "thirdparty/spdlog/sinks/ansicolor_sink.h"
|
|
#include "thirdparty/spdlog/sinks/rotating_file_sink.h"
|
|
|
|
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;
|
|
|
|
extern std::shared_ptr<spdlog::logger> g_TermLogger;
|
|
extern std::shared_ptr<spdlog::logger> g_ImGuiLogger;
|
|
|
|
//-------------------------------------------------------------------------
|
|
// IMGUI CONSOLE SINK |
|
|
extern std::ostringstream g_LogStream;
|
|
extern std::shared_ptr<spdlog::sinks::ostream_sink_st> g_LogSink;
|
|
|
|
void SpdLog_Init(void);
|
|
void SpdLog_Create(void);
|
|
void SpdLog_PostInit(void);
|
|
void SpdLog_Shutdown(void);
|