Fix verbosity in interactive prompts.
PiperOrigin-RevId: 233482282
This commit is contained in:
parent
8039f40966
commit
d584984e82
@ -45,4 +45,4 @@ def report_internal_error(entity, exception):
|
|||||||
'Unexpected error transforming %s. If you believe this is due to a bug,'
|
'Unexpected error transforming %s. If you believe this is due to a bug,'
|
||||||
' please set the verbosity to 10 (on Linux, `export '
|
' please set the verbosity to 10 (on Linux, `export '
|
||||||
'AUTOGRAPH_VERBOSITY=10`) and attach the full output when filing the bug '
|
'AUTOGRAPH_VERBOSITY=10`) and attach the full output when filing the bug '
|
||||||
'report. Caused by %s' % (entity, exception))
|
'report. Caused by: %s' % (entity, exception))
|
||||||
|
|||||||
@ -136,6 +136,8 @@ def log(level, msg, *args, **kwargs):
|
|||||||
|
|
||||||
def warn(msg, *args, **kwargs):
|
def warn(msg, *args, **kwargs):
|
||||||
logging.warn(msg, *args, **kwargs)
|
logging.warn(msg, *args, **kwargs)
|
||||||
|
if echo_log_to_stdout:
|
||||||
|
print('WARNING:', msg % args)
|
||||||
|
|
||||||
|
|
||||||
def warn_first_n(msg, *args, **kwargs):
|
def warn_first_n(msg, *args, **kwargs):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user