[3.13] [doc]: Update logging cookbook to mention domain socket configuration in a recipe. (GH-130348) (GH-130351)

(cherry picked from commit 8cbcf51d61)
This commit is contained in:
Miss Islington (bot) 2025-02-20 15:20:26 +01:00 committed by GitHub
parent c05d0d8425
commit 0a992ff383
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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 :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 :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
.. _context-info: