Skip to content

Commit 0f9aa9f

Browse files
committed
Update logcat logger configuration in cpython.dart
Switches logging from the root logger to a dedicated 'logcat' logger, disables propagation, and sets the log level to ERROR instead of DEBUG. This change improves log handling and reduces log verbosity.
1 parent c47ffd3 commit 0f9aa9f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/serious_python_android/lib/src/cpython.dart

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,10 @@ if not getattr(sys, "__serious_python_logcat_configured__", False):
5454
sys.stdout = sys.stderr = _LogcatWriter()
5555
handler = logging.StreamHandler(sys.stderr)
5656
handler.setFormatter(logging.Formatter("%(levelname)s %(message)s"))
57-
root = logging.getLogger()
58-
root.handlers[:] = [handler]
59-
root.setLevel(logging.DEBUG)
57+
logcat = logging.getLogger("logcat")
58+
logcat.propagate = False
59+
logcat.handlers[:] = [handler]
60+
logcat.setLevel(logging.ERROR)
6061
''';
6162

6263
CPython getCPython(String dynamicLibPath) {

0 commit comments

Comments
 (0)