mirror of
https://github.com/httprunner/httprunner.git
synced 2026-09-05 15:37:35 +08:00
change: avoid print too much log details in console
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
# Release History
|
# Release History
|
||||||
|
|
||||||
## 3.1.0 (2020-06-18)
|
## 3.1.0 (2020-06-19)
|
||||||
|
|
||||||
**Added**
|
**Added**
|
||||||
|
|
||||||
|
|||||||
@@ -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"])
|
||||||
|
|||||||
Reference in New Issue
Block a user