Skip to content

Commit c6433f8

Browse files
committed
Use root logger for logcat configuration
Replaces the use of the 'logcat' logger with the root logger when configuring logging in the embedded Python script. This ensures that all logging output is handled consistently at the ERROR level.
1 parent ddd850b commit c6433f8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/serious_python_android/lib/src/cpython.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ 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-
logcat = logging.getLogger("logcat")
58-
logcat.handlers[:] = [handler]
59-
logcat.setLevel(logging.ERROR)
57+
root = logging.getLogger()
58+
root.handlers[:] = [handler]
59+
root.setLevel(logging.ERROR)
6060
''';
6161

6262
CPython getCPython(String dynamicLibPath) {

0 commit comments

Comments
 (0)