client: forgot debug

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

View file

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