Adding MultiLogger

This commit is contained in:
Christoffer Lerno
2025-08-05 18:49:41 +02:00
parent 0205ee8688
commit ed61b51489

View File

@@ -169,6 +169,19 @@ struct NullLogger (Logger)
fn void NullLogger.log(&self, LogPriority priority, LogCategory category, LogTag tag, String file, String function, int line, String fmt, any[] args) @dynamic
{}
struct MultiLogger (Logger)
{
Logger[] loggers;
}
fn void MultiLogger.log(&self, LogPriority priority, LogCategory category, LogTag tag, String file, String function, int line, String fmt, any[] args) @dynamic
{
foreach (logger : self.loggers)
{
logger.log(priority, category, tag, file, function, line, fmt, args);
}
}
module std::core::log @private;
import std::io, std::thread, std::time;