Skip to content

Commit 8297e1d

Browse files
committed
[doc]: Update logging cookbook to mention domain socket configuration in a recipe.
1 parent 048ee2d commit 8297e1d

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 `listener.json`, add a `socket` key with the path to the domain socket
842+
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 `webapp.json`, change the socket handler configuration dictionary so that
847+
the `host` value is the path to the domain socket, and set the `port` value
848+
to `null`.
849+
850+
838851
.. currentmodule:: logging
839852

840853
.. _context-info:

0 commit comments

Comments
 (0)