onLog method
The onLog method is invoked when a log record is received by the LogManager.
It takes a LogRecordEntity object as a parameter, representing the log record that needs to be processed.
The method iterates through the listeners (log recorders) attached to the LogManager and invokes the onRecord method of each recorder for recording the log, based on their individual recording criteria.
Implementation
void onLog(LogRecordEntity record) {
if (record.level >= logLevel) {
for (final recorder in listeners) {
if (recorder.canRecord(record)) {
recorder.onRecord(record);
}
}
}
}