diff --git a/pythonforandroid/toolchain.py b/pythonforandroid/toolchain.py index e8a744c451..a99646f767 100755 --- a/pythonforandroid/toolchain.py +++ b/pythonforandroid/toolchain.py @@ -85,7 +85,11 @@ def __getattr__(self, key): class LevelDifferentiatingFormatter(logging.Formatter): def format(self, record): - if record.levelno > 20: + if record.levelno > 30: + record.msg = '{}{}[ERROR]{}{}: '.format( + Err_Style.BRIGHT, Err_Fore.RED, Err_Fore.RESET, + Err_Style.RESET_ALL) + record.msg + elif record.levelno > 20: record.msg = '{}{}[WARNING]{}{}: '.format( Err_Style.BRIGHT, Err_Fore.RED, Err_Fore.RESET, Err_Style.RESET_ALL) + record.msg @@ -111,6 +115,7 @@ def format(self, record): info = logger.info debug = logger.debug warning = logger.warning +error = logger.error IS_PY3 = sys.version_info[0] >= 3 @@ -1008,7 +1013,7 @@ def prepare_build_environment(self, user_sdk_dir, user_ndk_dir, 'android-{}'.format(self.android_api), platform_dir) if not exists(self.ndk_platform): - warning('ndk_platform doesn\'t exist') + warning('ndk_platform doesn\'t exist: {}'.format(self.ndk_platform)) ok = False py_platform = sys.platform @@ -1065,6 +1070,7 @@ def prepare_build_environment(self, user_sdk_dir, user_ndk_dir, executable)) if not ok: + error('{}python-for-android cannot continue; aborting{}'.format(Err_Fore.RED, Err_Fore.RESET)) sys.exit(1) def __init__(self):