Skip to content

Commit 8cbcf51

Browse files
authored
[doc]: Update logging cookbook to mention domain socket configuration in a recipe. (GH-130348)
1 parent 5a13faa commit 8cbcf51

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

Doc/howto/logging-cookbook.rst

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -825,16 +825,29 @@ To test these files, do the following in a POSIX environment:
825825
which will lead to records being written to the log.
826826

827827
#. Inspect the log files in the :file:`run` subdirectory. You should see the
828-
most recent log lines in files matching the pattern :file:`app.log*`. They won't be in
829-
any particular order, since they have been handled concurrently by different
830-
worker processes in a non-deterministic way.
828+
most recent log lines in files matching the pattern :file:`app.log*`. They
829+
won't be in any particular order, since they have been handled concurrently
830+
by different worker processes in a non-deterministic way.
831831

832832
#. You can shut down the listener and the web application by running
833833
``venv/bin/supervisorctl -c supervisor.conf shutdown``.
834834

835835
You may need to tweak the configuration files in the unlikely event that the
836836
configured ports clash with something else in your test environment.
837837

838+
The default configuration uses a TCP socket on port 9020. You can use a Unix
839+
Domain socket instead of a TCP socket by doing the following:
840+
841+
#. In :file:`listener.json`, add a ``socket`` key with the path to the domain
842+
socket you want to use. If this key is present, the listener listens on the
843+
corresponding domain socket and not on a TCP socket (the ``port`` key is
844+
ignored).
845+
846+
#. In :file:`webapp.json`, change the socket handler configuration dictionary
847+
so that the ``host`` value is the path to the domain socket, and set the
848+
``port`` value to ``null``.
849+
850+
838851
.. currentmodule:: logging
839852

840853
.. _context-info:

0 commit comments

Comments
 (0)