mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2024-11-08 08:47:17 +01:00
Add a logging option for unformatted strings.
This commit is contained in:
parent
67f514c77c
commit
78c2003797
@ -405,6 +405,19 @@ void Logger::Proccess(Uint8 level, bool sub)
|
||||
}
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void Logger::Send(Uint8 level, bool sub, CCStr msg, size_t len)
|
||||
{
|
||||
// Is this level even allowed?
|
||||
if ((m_ConsoleLevels & level) || (m_LogFileLevels & level))
|
||||
{
|
||||
// Generate the message in the buffer
|
||||
m_Buffer.Write(0, msg, static_cast< Buffer::SzType >(len));
|
||||
// Process the message in the buffer
|
||||
Proccess(level, sub);
|
||||
}
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void Logger::Send(Uint8 level, bool sub, CCStr fmt, va_list args)
|
||||
{
|
||||
|
@ -295,6 +295,11 @@ public:
|
||||
*/
|
||||
void BindCb(Uint8 level, Function & func);
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Send a log message.
|
||||
*/
|
||||
void Send(Uint8 level, bool sub, CCStr msg, size_t len);
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Send a log message.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user