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)
for (final LoggingInterface i in I._interfaces) {
i.log(
message,
level: level,
metadata: metadata,
stackTrace: stackTrace,
extra: extra,
);
if (initialized) {
i.log(
message,
level: level,
metadata: metadata,
stackTrace: stackTrace,
extra: extra,
);
}
}
_logStreamController.add(