Skip to content

Commit 9e73a21

Browse files
committed
Set root logger level in embedded Python logging config
Adds a line to explicitly set the root logger's level to its effective level in the embedded Python logging configuration. This ensures consistent logging behavior when initializing the logger.
1 parent 38e5022 commit 9e73a21

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/serious_python_android/lib/src/cpython.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ if not getattr(sys, "__serious_python_logcat_configured__", False):
5656
handler.setFormatter(logging.Formatter("%(levelname)s %(message)s"))
5757
root = logging.getLogger()
5858
root.handlers[:] = [handler]
59+
root.setLevel(logging.getLogger().getEffectiveLevel())
5960
''';
6061

6162
CPython getCPython(String dynamicLibPath) {

0 commit comments

Comments
 (0)