send logs about trace only in debug mode (#2115)

This commit is contained in:
cyan
2025-03-26 03:34:39 +02:00
committed by GitHub
parent 36600dd82b
commit 72e011ead0
9 changed files with 10 additions and 9 deletions
+3 -2
View File
@@ -1,4 +1,5 @@
import 'dart:math';
import 'package:flutter/foundation.dart';
void printV(dynamic content) {
CustomTrace programInfo = CustomTrace(StackTrace.current);
@@ -20,7 +21,7 @@ class CustomTrace {
try {
_parseTrace();
} catch (e) {
print("Unable to parse trace (printV): $e");
if (kDebugMode) print("Unable to parse trace (printV): $e");
}
}
@@ -80,7 +81,7 @@ class CustomTrace {
columnStr = columnStr.replaceFirst(")", "");
this.columnNumber = int.tryParse(columnStr);
} catch (e) {
print("Unable to parse trace (printV): $e");
if (kDebugMode) print("Unable to parse trace (printV): $e");
}
}
}