Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

[mob][photos] Cleaner indication of isolate logging

laurenspriemb90a719972c1
diff --git a/mobile/lib/core/error-reporting/isolate_logging.dart b/mobile/lib/core/error-reporting/isolate_logging.dart
index 0d686178f8..5521e0748d 100644
--- a/mobile/lib/core/error-reporting/isolate_logging.dart
+++ b/mobile/lib/core/error-reporting/isolate_logging.dart
@@ -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);
diff --git a/mobile/lib/core/error-reporting/super_logging.dart b/mobile/lib/core/error-reporting/super_logging.dart
index f146b1b14c..c71cea8254 100644
--- a/mobile/lib/core/error-reporting/super_logging.dart
+++ b/mobile/lib/core/error-reporting/super_logging.dart
@@ -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";