Skip to content

Commit 91eb676

Browse files
committed
Remove logging configuration from logcat init script
Eliminated the use of the logging module and related configuration from the _logcatInitScript in cpython.dart. This simplifies the script and avoids unnecessary logging setup during initialization.
1 parent f3dd026 commit 91eb676

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/serious_python_android/lib/src/cpython.dart

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export 'gen.dart';
1313
CPython? _cpython;
1414
String? _logcatForwardingError;
1515
const _logcatInitScript = r'''
16-
import sys, logging
16+
import sys
1717
1818
# Make this init idempotent across Dart isolate restarts.
1919
if not getattr(sys, "__serious_python_logcat_configured__", False):
@@ -37,11 +37,6 @@ if not getattr(sys, "__serious_python_logcat_configured__", False):
3737
pass
3838
3939
sys.stdout = sys.stderr = _LogcatWriter()
40-
handler = logging.StreamHandler(sys.stderr)
41-
handler.setFormatter(logging.Formatter("%(levelname)s %(message)s"))
42-
root = logging.getLogger()
43-
root.handlers[:] = [handler]
44-
root.setLevel(logging.DEBUG)
4540
''';
4641

4742
CPython getCPython(String dynamicLibPath) {

0 commit comments

Comments
 (0)