1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2025-07-22 16:57:12 +02:00

Add a logging option for unformatted strings.

This commit is contained in:
Sandu Liviu Catalin
2020-09-06 23:54:44 +03:00
parent 67f514c77c
commit 78c2003797
2 changed files with 18 additions and 0 deletions

View File

@@ -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)
{