[mob][photos] Cleaner indication of isolate logging

This commit is contained in:
laurenspriem 2024-09-02 11:24:57 +02:00
parent d40dc06171
commit b90a719972
2 changed files with 4 additions and 3 deletions

View File

@ -28,7 +28,7 @@ class IsolateLogger {
final Queue<IsolateLogString> fileQueueEntries = Queue();
Future onLogRecordInIsolate(LogRecord rec) async {
final str = "[ISOLATE]" + rec.toPrettyString();
final str = rec.toPrettyString(null, true);
// write to stdout
SuperLogging.printLog(str);

View File

@ -38,8 +38,9 @@ extension SuperString on String {
}
extension SuperLogRecord on LogRecord {
String toPrettyString([String? extraLines]) {
final header = "[$loggerName] [$level] [$time]";
String toPrettyString([String? extraLines, bool inIsolate = false]) {
final header =
"[$loggerName${inIsolate ? " (in isolate)" : ""}] [$level] [$time]";
var msg = "$header $message";