@@ -85,7 +85,11 @@ def __getattr__(self, key):
85
85
86
86
class LevelDifferentiatingFormatter (logging .Formatter ):
87
87
def format (self , record ):
88
- if record .levelno > 20 :
88
+ if record .levelno > 30 :
89
+ record .msg = '{}{}[ERROR]{}{}: ' .format (
90
+ Err_Style .BRIGHT , Err_Fore .RED , Err_Fore .RESET ,
91
+ Err_Style .RESET_ALL ) + record .msg
92
+ elif record .levelno > 20 :
89
93
record .msg = '{}{}[WARNING]{}{}: ' .format (
90
94
Err_Style .BRIGHT , Err_Fore .RED , Err_Fore .RESET ,
91
95
Err_Style .RESET_ALL ) + record .msg
@@ -111,6 +115,7 @@ def format(self, record):
111
115
info = logger .info
112
116
debug = logger .debug
113
117
warning = logger .warning
118
+ error = logger .error
114
119
115
120
116
121
IS_PY3 = sys .version_info [0 ] >= 3
@@ -1008,7 +1013,7 @@ def prepare_build_environment(self, user_sdk_dir, user_ndk_dir,
1008
1013
'android-{}' .format (self .android_api ),
1009
1014
platform_dir )
1010
1015
if not exists (self .ndk_platform ):
1011
- warning ('ndk_platform doesn\' t exist' )
1016
+ warning ('ndk_platform doesn\' t exist: {}' . format ( self . ndk_platform ) )
1012
1017
ok = False
1013
1018
1014
1019
py_platform = sys .platform
@@ -1065,6 +1070,7 @@ def prepare_build_environment(self, user_sdk_dir, user_ndk_dir,
1065
1070
executable ))
1066
1071
1067
1072
if not ok :
1073
+ error ('{}python-for-android cannot continue; aborting{}' .format (Err_Fore .RED , Err_Fore .RESET ))
1068
1074
sys .exit (1 )
1069
1075
1070
1076
def __init__ (self ):
0 commit comments