2
3
4
5
10#include <spdlog/sinks/basic_file_sink.h>
16
17
21
22
26
27
31
32
37
38
42
43
47
48
52
53
57
58
62
63
70 m_TraceLogInfos.clear();
71 m_InfoLogInfos.clear();
72 m_WarnLogInfos.clear();
73 m_ErrorLogInfos.clear();
74 m_CriticalLogInfos.clear();
79
80
86
87
88
89
90 Console(
const std::string& filePath, uint32_t maxInfos = 50);
93
94
98
99
100
101
102
104 const std::string& name,
105 const std::string& filePath =
""
109
110
111
115
116
120
121
122
123
124 void Push(
const std::string& cmd);
127
128
129
135
136
137
138 void sink_it_(
const spdlog::details::log_msg& msg)
override;
141
142
148
149
153
154
158
159
#define SPICES_PROFILE_ZONE
const std::string & GetFilePath()
Get Console output file.
static std::shared_ptr< Console > Registry(const std::string &name, const std::string &filePath="")
Registry a console to ConsolePool.
Console(const std::string &filePath, uint32_t maxInfos=50)
Constructor Function.
std::string m_FilePath
Console File Path.
virtual void flush_() override
Inherited from spdlog, run when spdlog flush.
void Push(const std::string &cmd)
Push a Command to Console.
void Clear()
Clear Console Infos.
void sink_it_(const spdlog::details::log_msg &msg) override
Inherited from spdlog, run when a message pushed.
InfoData m_InfoData
Console Information.
uint32_t m_MaxInfos
Maximum Num of Information's.
const InfoData & GetInfos() const
Get Console Infos.
virtual ~Console() override=default
Destructor Function.
static std::unordered_map< std::string, std::shared_ptr< Console > > m_GlobalConsolePool
Global Console Pool.
std::deque< InfoLevelHelper > m_InfoLogInfos
info deque.
std::deque< InfoLevelHelper > m_WarnLogInfos
warn deque.
std::deque< InfoLevelHelper > m_TraceLogInfos
trace deque.
std::deque< InfoLevelHelper > m_ErrorLogInfos
error deque.
std::deque< InfoLevelHelper > m_CriticalLogInfos
critical deque.
Console Information Data.
glm::vec4 color
specific color of this information.
std::string level
specific level of this information.
std::string str
Info information.
Help data of specific level of information.