Fix wrong `log_file` docs

This commit is contained in:
Zac Hatfield-Dodds 2022-04-21 15:33:48 -07:00
parent 28e8c8582e
commit c068196969
2 changed files with 4 additions and 1 deletions

View File

@ -198,6 +198,9 @@ option names are:
If you need to record the whole test suite logging calls to a file, you can pass If you need to record the whole test suite logging calls to a file, you can pass
``--log-file=/path/to/log/file``. This log file is opened in write mode which ``--log-file=/path/to/log/file``. This log file is opened in write mode which
means that it will be overwritten at each run tests session. means that it will be overwritten at each run tests session.
Note that relative paths for the log-file location are always resolved relative
to the current working directory, whether passed on the CLI or declared in a
config file.
You can also specify the logging level for the log file by passing You can also specify the logging level for the log file by passing
``--log-file-level``. This setting accepts the logging level names as seen in ``--log-file-level``. This setting accepts the logging level names as seen in

View File

@ -1514,7 +1514,7 @@ passed multiple times. The expected format is ``name=value``. For example::
Sets a file name relative to the ``pytest.ini`` file where log messages should be written to, in addition Sets a file name relative to the current working directory where log messages should be written to, in addition
to the other logging facilities that are active. to the other logging facilities that are active.
.. code-block:: ini .. code-block:: ini