fix #185: log hrun logs to specified file

This commit is contained in:
debugtalk
2018-04-20 15:14:57 +08:00
parent 061f55cb1e
commit e5191fd740
2 changed files with 10 additions and 3 deletions

View File

@@ -37,6 +37,9 @@ def main_hrun():
parser.add_argument(
'--log-level', default='INFO',
help="Specify logging level, default is INFO.")
parser.add_argument(
'--log-file',
help="Write logs to specified file path.")
parser.add_argument(
'--dot-env-path',
help="Specify .env file path, which is useful for keeping production credentials.")
@@ -54,7 +57,7 @@ def main_hrun():
help="Prettify JSON testset format.")
args = parser.parse_args()
logger.setup_logger(args.log_level)
logger.setup_logger(args.log_level, args.log_file)
if is_py2:
logger.log_warning(get_python2_retire_msg())