Only send log messages to the LoggingInterfaces if the logging service has been initialized

Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
This commit is contained in:
2025-04-29 12:59:35 +02:00
parent 9f1b26e097
commit 6fb304a4a1
@@ -240,13 +240,15 @@ class ArcaneLogger {
// Send logs to registered interface(s) // Send logs to registered interface(s)
for (final LoggingInterface i in I._interfaces) { for (final LoggingInterface i in I._interfaces) {
i.log( if (initialized) {
message, i.log(
level: level, message,
metadata: metadata, level: level,
stackTrace: stackTrace, metadata: metadata,
extra: extra, stackTrace: stackTrace,
); extra: extra,
);
}
} }
_logStreamController.add( _logStreamController.add(