mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2024-11-08 00:37:15 +01:00
Add an extra method to the logger.
This commit is contained in:
parent
a1a71ee031
commit
b87e68b9fc
@ -556,6 +556,21 @@ void Logger::ProcessMessage()
|
||||
}
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void Logger::Send(uint8_t level, bool sub, const char * msg)
|
||||
{
|
||||
// Is this level even allowed?
|
||||
if ((m_ConsoleLevels & level) || (m_LogFileLevels & level))
|
||||
{
|
||||
// Create a new message builder
|
||||
MsgPtr message(new Message(level, sub));
|
||||
// Generate the log message
|
||||
message->Append(msg);
|
||||
// Process the message in the buffer
|
||||
PushMessage(message);
|
||||
}
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void Logger::Send(uint8_t level, bool sub, const char * msg, size_t len)
|
||||
{
|
||||
|
@ -409,6 +409,11 @@ public:
|
||||
*/
|
||||
void BindCb(uint8_t level, Function & func);
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Send a log message.
|
||||
*/
|
||||
void Send(uint8_t level, bool sub, const char * msg);
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Send a log message.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user