Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 20, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 16 additions & 3 deletions Doc/howto/logging-cookbook.rst
Original file line number Diff line number Diff line change
Expand Up @@ -825,16 +825,29 @@ 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``.

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:
Expand Down
Loading