change: avoid print too much log details in console

This commit is contained in:
debugtalk
2020-06-19 14:28:00 +08:00
parent ec44faa62b
commit e3947c055a
2 changed files with 8 additions and 1 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
# Release History # Release History
## 3.1.0 (2020-06-18) ## 3.1.0 (2020-06-19)
**Added** **Added**
+7
View File
@@ -21,6 +21,8 @@ $ pip install locust
sys.exit(1) sys.exit(1)
from loguru import logger
""" converted pytest files from YAML/JSON testcases """ converted pytest files from YAML/JSON testcases
""" """
pytest_files: List = [] pytest_files: List = []
@@ -69,9 +71,14 @@ def main_locusts():
""" """
from httprunner.utils import init_sentry_sdk from httprunner.utils import init_sentry_sdk
from sentry_sdk import capture_message from sentry_sdk import capture_message
init_sentry_sdk() init_sentry_sdk()
capture_message("start to run locusts") capture_message("start to run locusts")
# avoid print too much log details in console
logger.remove()
logger.add(sys.stderr, level="WARNING")
sys.argv[0] = "locust" sys.argv[0] = "locust"
if len(sys.argv) == 1: if len(sys.argv) == 1:
sys.argv.extend(["-h"]) sys.argv.extend(["-h"])