From d57d10a9e2178c09586c3f1945b4c6286068b615 Mon Sep 17 00:00:00 2001 From: Mathieu Virbel Date: Fri, 16 Nov 2018 09:57:03 +0100 Subject: [PATCH] Fixes P4A_FULL_DEBUG that is broken --- pythonforandroid/logger.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pythonforandroid/logger.py b/pythonforandroid/logger.py index 38afba0e5f..f293f0073c 100644 --- a/pythonforandroid/logger.py +++ b/pythonforandroid/logger.py @@ -148,8 +148,10 @@ def shprint(command, *args, **kwargs): kwargs["_bg"] = True is_critical = kwargs.pop('_critical', False) tail_n = kwargs.pop('_tail', None) + full_debug = False if "P4A_FULL_DEBUG" in os.environ: tail_n = 0 + full_debug = True filter_in = kwargs.pop('_filter', None) filter_out = kwargs.pop('_filterout', None) if len(logger.handlers) > 1: @@ -177,6 +179,10 @@ def shprint(command, *args, **kwargs): if isinstance(line, bytes): line = line.decode('utf-8', errors='replace') if logger.level > logging.DEBUG: + if full_debug: + stdout.write(line) + stdout.flush() + continue msg = line.replace( '\n', ' ').replace( '\t', ' ').replace(