Extra log messages will not longer be added to the log stream if more than one LoggingInterface is registered

Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
This commit is contained in:
2025-04-29 12:57:21 +02:00
parent cb224560dc
commit 9f1b26e097
@@ -180,10 +180,6 @@ class ArcaneLogger {
/// impact performance. /// impact performance.
bool skipAutodetection = false, bool skipAutodetection = false,
}) { }) {
if (!I._initialized) {
throw Exception("ArcaneLogger has not yet been initialized.");
}
metadata ??= <String, String>{}; metadata ??= <String, String>{};
metadata.putIfAbsent("timestamp", () => DateTime.now().toIso8601String()); metadata.putIfAbsent("timestamp", () => DateTime.now().toIso8601String());
@@ -251,6 +247,7 @@ class ArcaneLogger {
stackTrace: stackTrace, stackTrace: stackTrace,
extra: extra, extra: extra,
); );
}
_logStreamController.add( _logStreamController.add(
"$message ${{ "$message ${{
@@ -260,7 +257,6 @@ class ArcaneLogger {
}}", }}",
); );
} }
}
/// Registers a [LoggingInterface] with the [ArcaneLogger]. /// Registers a [LoggingInterface] with the [ArcaneLogger].
/// Due to iOS app tracking permissions, permission to track must first be /// Due to iOS app tracking permissions, permission to track must first be