From 8297e1d5438079d57b4e8f5652fd2a805ea45916 Mon Sep 17 00:00:00 2001 From: Vinay Sajip Date: Thu, 20 Feb 2025 13:01:12 +0000 Subject: [PATCH 1/3] [doc]: Update logging cookbook to mention domain socket configuration in a recipe. --- Doc/howto/logging-cookbook.rst | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/Doc/howto/logging-cookbook.rst b/Doc/howto/logging-cookbook.rst index 3cd2f1d96a7b34..8716ee8cbc3744 100644 --- a/Doc/howto/logging-cookbook.rst +++ b/Doc/howto/logging-cookbook.rst @@ -825,9 +825,9 @@ To test these files, do the following in a POSIX environment: which will lead to records being written to the log. #. Inspect the log files in the :file:`run` subdirectory. You should see the - most recent log lines in files matching the pattern :file:`app.log*`. They won't be in - any particular order, since they have been handled concurrently by different - worker processes in a non-deterministic way. + most recent log lines in files matching the pattern :file:`app.log*`. They + won't be in any particular order, since they have been handled concurrently + by different worker processes in a non-deterministic way. #. You can shut down the listener and the web application by running ``venv/bin/supervisorctl -c supervisor.conf shutdown``. @@ -835,6 +835,19 @@ To test these files, do the following in a POSIX environment: You may need to tweak the configuration files in the unlikely event that the configured ports clash with something else in your test environment. +The default configuration uses a TCP socket on port 9020. You can use a Unix +Domain socket instead of a TCP socket by doing the following: + +#. In `listener.json`, add a `socket` key with the path to the domain socket + you want to use. If this key is present, the listener listens on the + corresponding domain socket and not on a TCP socket (the `port` key is + ignored). + +#. In `webapp.json`, change the socket handler configuration dictionary so that + the `host` value is the path to the domain socket, and set the `port` value + to `null`. + + .. currentmodule:: logging .. _context-info: From 413717c80d2c5827d463ab8ac649e899f9433eee Mon Sep 17 00:00:00 2001 From: Vinay Sajip Date: Thu, 20 Feb 2025 13:08:41 +0000 Subject: [PATCH 2/3] Use double backticks to placate sphinx-lint. --- Doc/howto/logging-cookbook.rst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Doc/howto/logging-cookbook.rst b/Doc/howto/logging-cookbook.rst index 8716ee8cbc3744..5f70c05d1d7db3 100644 --- a/Doc/howto/logging-cookbook.rst +++ b/Doc/howto/logging-cookbook.rst @@ -838,14 +838,14 @@ configured ports clash with something else in your test environment. The default configuration uses a TCP socket on port 9020. You can use a Unix Domain socket instead of a TCP socket by doing the following: -#. In `listener.json`, add a `socket` key with the path to the domain socket - you want to use. If this key is present, the listener listens on the - corresponding domain socket and not on a TCP socket (the `port` key is +#. In :file:`listener.json`, add a ``socket`` key with the path to the domain + socket you want to use. If this key is present, the listener listens on the + corresponding domain socket and not on a TCP socket (the ``port`` key is ignored). -#. In `webapp.json`, change the socket handler configuration dictionary so that - the `host` value is the path to the domain socket, and set the `port` value - to `null`. +#. In :file:`webapp.json`, change the socket handler configuration dictionary + so that the ``host`` value is the path to the domain socket, and set the + ``port`` value to `null`. .. currentmodule:: logging From 25440f8980cc65ae0de556f95ab965eb550227b2 Mon Sep 17 00:00:00 2001 From: Vinay Sajip Date: Thu, 20 Feb 2025 13:11:29 +0000 Subject: [PATCH 3/3] Use double backticks to placate sphinx-lint. --- Doc/howto/logging-cookbook.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/howto/logging-cookbook.rst b/Doc/howto/logging-cookbook.rst index 5f70c05d1d7db3..f08f45179980f3 100644 --- a/Doc/howto/logging-cookbook.rst +++ b/Doc/howto/logging-cookbook.rst @@ -845,7 +845,7 @@ Domain socket instead of a TCP socket by doing the following: #. In :file:`webapp.json`, change the socket handler configuration dictionary so that the ``host`` value is the path to the domain socket, and set the - ``port`` value to `null`. + ``port`` value to ``null``. .. currentmodule:: logging