mirror of
https://github.com/hanskokx/arcane_framework.git
synced 2026-05-14 02:19:08 +02:00
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:
@@ -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,15 +247,15 @@ class ArcaneLogger {
|
|||||||
stackTrace: stackTrace,
|
stackTrace: stackTrace,
|
||||||
extra: extra,
|
extra: extra,
|
||||||
);
|
);
|
||||||
|
|
||||||
_logStreamController.add(
|
|
||||||
"$message ${{
|
|
||||||
"level": level,
|
|
||||||
"metadata": metadata,
|
|
||||||
"extra": extra,
|
|
||||||
}}",
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_logStreamController.add(
|
||||||
|
"$message ${{
|
||||||
|
"level": level,
|
||||||
|
"metadata": metadata,
|
||||||
|
"extra": extra,
|
||||||
|
}}",
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Registers a [LoggingInterface] with the [ArcaneLogger].
|
/// Registers a [LoggingInterface] with the [ArcaneLogger].
|
||||||
|
|||||||
Reference in New Issue
Block a user