@@ -85,7 +85,11 @@ def __getattr__(self, key):
8585
8686class LevelDifferentiatingFormatter (logging .Formatter ):
8787 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 :
8993 record .msg = '{}{}[WARNING]{}{}: ' .format (
9094 Err_Style .BRIGHT , Err_Fore .RED , Err_Fore .RESET ,
9195 Err_Style .RESET_ALL ) + record .msg
@@ -111,6 +115,7 @@ def format(self, record):
111115info = logger .info
112116debug = logger .debug
113117warning = logger .warning
118+ error = logger .error
114119
115120
116121IS_PY3 = sys .version_info [0 ] >= 3
@@ -1008,7 +1013,7 @@ def prepare_build_environment(self, user_sdk_dir, user_ndk_dir,
10081013 'android-{}' .format (self .android_api ),
10091014 platform_dir )
10101015 if not exists (self .ndk_platform ):
1011- warning ('ndk_platform doesn\' t exist' )
1016+ warning ('ndk_platform doesn\' t exist: {}' . format ( self . ndk_platform ) )
10121017 ok = False
10131018
10141019 py_platform = sys .platform
@@ -1065,6 +1070,7 @@ def prepare_build_environment(self, user_sdk_dir, user_ndk_dir,
10651070 executable ))
10661071
10671072 if not ok :
1073+ error ('{}python-for-android cannot continue; aborting{}' .format (Err_Fore .RED , Err_Fore .RESET ))
10681074 sys .exit (1 )
10691075
10701076 def __init__ (self ):
0 commit comments