diff --git a/README.md b/README.md index 27490f3..6d456b7 100755 --- a/README.md +++ b/README.md @@ -120,11 +120,18 @@ pytest --stresstest tests/turboPmac1/ax1/test_common.py Each motor has its own dedicated logger, whose loglevel can be set with the flag `--log=LEVEL`. `LEVEL` should be one of the `logging` - native levels - i.e. `DEBUG`, `INFO`, `WARNING`, `ERROR` or `CRITICAL` (see -https://docs.python.org/3/library/logging.html#logging-levels). To see the level -description, run: -```bash -pytest --help | grep -- '--log=' -``` +https://docs.python.org/3/library/logging.html#logging-levels). + +In the context of this test framework, the log levels mean the following: +- `DEBUG`: Show all raw caput and caget commands +- `INFO`: Write high-level commands (e.g. move, stop, home etc.) +- `WARNING`: Not used +- `ERROR`: Serious error (e.g. motor could not be enabled / disabled) +- `CRITICAL`: Not used +All error levels higher than the defined one are forwarded to the Pytest +logger. + +The default log level is `CRITICAL`. To specify the log level for a test run: ```bash diff --git a/tests/conftest.py b/tests/conftest.py index 1a2f7a0..1f29a25 100755 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,6 +1,5 @@ from pathlib import Path import logging -import textwrap from caproto.sync.client import read import pytest @@ -48,16 +47,7 @@ def pytest_addoption(parser): "--log", action="store", default="ERROR", - help=textwrap.dedent(""" - Set log level: - - DEBUG: Show all raw caput and caget commands - - INFO: Write high-level commands (e.g. move, stop, home etc.) - - WARNING: Not used - - ERROR: Serious error (e.g. motor could not be enabled / disabled) - - CRITICAL: Not used - All error levels higher than the defined one are forwarded to the Pytest - logger. - """).replace("\n", " ") + help="Set log level: DEBUG, INFO, WARNING, ERROR or CRITICAL" )