Skip to content

Commit 0b30bb3

Browse files
committed
update docs
1 parent 8719db9 commit 0b30bb3

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

docs/configuration.rst

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,35 @@ follows.
301301

302302
*Introduced*: 3.0
303303

304+
``logfile_format``
305+
306+
The format string used for entries in the main supervisord activity log.
307+
This uses Python's `logging format strings <https://docs.python.org/3/library/logging.html#logrecord-attributes>`_.
308+
Available fields include ``%(asctime)s`` (timestamp), ``%(levelname)s``
309+
(log level), ``%(message)s`` (log message), ``%(process)d`` (process ID),
310+
``%(name)s`` (logger name), and other standard Python logging attributes.
311+
312+
*Default*: ``%(asctime)s %(levelname)s %(message)s``
313+
314+
*Required*: No.
315+
316+
*Introduced*: 4.3.0
317+
318+
``childlog_format``
319+
320+
The format string used for entries in child process log files (stdout/stderr).
321+
This uses Python's `logging format strings <https://docs.python.org/3/library/logging.html#logrecord-attributes>`_.
322+
Available fields include ``%(asctime)s`` (timestamp), ``%(message)s``
323+
(the actual output from the child process), ``%(name)s`` (logger name),
324+
and other standard Python logging attributes. Note that ``%(levelname)s``
325+
and ``%(process)d`` refer to the supervisord process, not the child process.
326+
327+
*Default*: ``%(message)s``
328+
329+
*Required*: No.
330+
331+
*Introduced*: 4.3.0
332+
304333
``pidfile``
305334

306335
The location in which supervisord keeps its pid file. This option
@@ -485,6 +514,8 @@ follows.
485514
logfile_maxbytes = 50MB
486515
logfile_backups=10
487516
loglevel = info
517+
logfile_format = %(asctime)s %(levelname)s %(message)s
518+
childlog_format = %(message)s
488519
pidfile = /tmp/supervisord.pid
489520
nodaemon = false
490521
minfds = 1024
@@ -930,6 +961,13 @@ where specified.
930961
that is not seekable, log rotation must be disabled by setting
931962
``stdout_logfile_maxbytes = 0``.
932963

964+
.. note::
965+
966+
The format of entries written to the stdout log file is controlled
967+
by the ``childlog_format`` option in the ``[supervisord]`` section.
968+
By default, only the raw output from the child process is logged,
969+
but you can customize it to include timestamps and other information.
970+
933971
*Default*: ``AUTO``
934972

935973
*Required*: No.
@@ -990,6 +1028,8 @@ where specified.
9901028
``stdout_syslog``
9911029

9921030
If true, stdout will be directed to syslog along with the process name.
1031+
The format of syslog entries is controlled by the ``childlog_format``
1032+
option in the ``[supervisord]`` section, prefixed with the process name.
9931033

9941034
*Default*: False
9951035

@@ -1015,6 +1055,13 @@ where specified.
10151055
that is not seekable, log rotation must be disabled by setting
10161056
``stderr_logfile_maxbytes = 0``.
10171057

1058+
.. note::
1059+
1060+
The format of entries written to the stderr log file is controlled
1061+
by the ``childlog_format`` option in the ``[supervisord]`` section.
1062+
By default, only the raw output from the child process is logged,
1063+
but you can customize it to include timestamps and other information.
1064+
10181065
*Default*: ``AUTO``
10191066

10201067
*Required*: No.
@@ -1073,6 +1120,8 @@ where specified.
10731120
``stderr_syslog``
10741121

10751122
If true, stderr will be directed to syslog along with the process name.
1123+
The format of syslog entries is controlled by the ``childlog_format``
1124+
option in the ``[supervisord]`` section, prefixed with the process name.
10761125

10771126
*Default*: False
10781127

0 commit comments

Comments
 (0)