From 5c04f3a1a2151a6d72203ed058ff4f8a50e97691 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 22 Apr 2022 18:40:15 +0000 Subject: [PATCH] [7.1.x] Fix wrong `log_file` docs (#9879) Co-authored-by: Zac Hatfield-Dodds --- doc/en/how-to/logging.rst | 2 ++ doc/en/reference/reference.rst | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/en/how-to/logging.rst b/doc/en/how-to/logging.rst index 2e8734fa6..5a089c2fb 100644 --- a/doc/en/how-to/logging.rst +++ b/doc/en/how-to/logging.rst @@ -198,6 +198,8 @@ option names are: 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 means that it will be overwritten at each run tests session. +Note that relative paths for the log-file location, whether passed on the CLI or declared in a +config file, are always resolved relative to the current working directory. 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 diff --git a/doc/en/reference/reference.rst b/doc/en/reference/reference.rst index aec384d6d..167c8fed9 100644 --- a/doc/en/reference/reference.rst +++ b/doc/en/reference/reference.rst @@ -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. .. code-block:: ini