client: forgot debug

This commit is contained in:
JerryXiao 2019-09-07 13:00:01 +08:00
parent e3fa77ca6a
commit b96164fe93

View file

@ -45,8 +45,11 @@ if __name__ == '__main__':
import argparse import argparse
from utils import configure_logger from utils import configure_logger
configure_logger(logger) configure_logger(logger)
def print_log(): def print_log(debug=False):
os.system(f'tail -n 43 -f \"{CONSOLE_LOGFILE}\"') if debug:
os.system(f'tail -n 43 -f \"buildbot.log\"')
else:
os.system(f'tail -n 43 -f \"{CONSOLE_LOGFILE}\"')
try: try:
actions = { actions = {
'info': 'show buildbot info', 'info': 'show buildbot info',
@ -113,7 +116,7 @@ if __name__ == '__main__':
logger.info(run('force_upload', args=(p,), kwargs={'overwrite': args.overwrite}, server=server)) logger.info(run('force_upload', args=(p,), kwargs={'overwrite': args.overwrite}, server=server))
elif action[0] == 'log': elif action[0] == 'log':
logger.info('printing logs') logger.info('printing logs')
print_log() print_log(debug=args.debug)
else: else:
parser.error("Please choose an action") parser.error("Please choose an action")
except Exception: except Exception: