Skip to content

Commit 7b16f24

Browse files
authored
Merge pull request #1462 from tito/fix-full-debug
Fixes P4A_FULL_DEBUG that is broken
2 parents c8bff6a + d57d10a commit 7b16f24

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pythonforandroid/logger.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,10 @@ def shprint(command, *args, **kwargs):
148148
kwargs["_bg"] = True
149149
is_critical = kwargs.pop('_critical', False)
150150
tail_n = kwargs.pop('_tail', None)
151+
full_debug = False
151152
if "P4A_FULL_DEBUG" in os.environ:
152153
tail_n = 0
154+
full_debug = True
153155
filter_in = kwargs.pop('_filter', None)
154156
filter_out = kwargs.pop('_filterout', None)
155157
if len(logger.handlers) > 1:
@@ -177,6 +179,10 @@ def shprint(command, *args, **kwargs):
177179
if isinstance(line, bytes):
178180
line = line.decode('utf-8', errors='replace')
179181
if logger.level > logging.DEBUG:
182+
if full_debug:
183+
stdout.write(line)
184+
stdout.flush()
185+
continue
180186
msg = line.replace(
181187
'\n', ' ').replace(
182188
'\t', ' ').replace(

0 commit comments

Comments
 (0)