@@ -301,6 +301,35 @@ follows.
301
301
302
302
*Introduced *: 3.0
303
303
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
+
304
333
``pidfile ``
305
334
306
335
The location in which supervisord keeps its pid file. This option
@@ -485,6 +514,8 @@ follows.
485
514
logfile_maxbytes = 50MB
486
515
logfile_backups =10
487
516
loglevel = info
517
+ logfile_format = %(asctime)s %(levelname)s %(message)s
518
+ childlog_format = %(message)s
488
519
pidfile = /tmp/supervisord.pid
489
520
nodaemon = false
490
521
minfds = 1024
@@ -930,6 +961,13 @@ where specified.
930
961
that is not seekable, log rotation must be disabled by setting
931
962
``stdout_logfile_maxbytes = 0 ``.
932
963
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
+
933
971
*Default *: ``AUTO ``
934
972
935
973
*Required *: No.
@@ -990,6 +1028,8 @@ where specified.
990
1028
``stdout_syslog ``
991
1029
992
1030
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.
993
1033
994
1034
*Default *: False
995
1035
@@ -1015,6 +1055,13 @@ where specified.
1015
1055
that is not seekable, log rotation must be disabled by setting
1016
1056
``stderr_logfile_maxbytes = 0 ``.
1017
1057
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
+
1018
1065
*Default *: ``AUTO ``
1019
1066
1020
1067
*Required *: No.
@@ -1073,6 +1120,8 @@ where specified.
1073
1120
``stderr_syslog ``
1074
1121
1075
1122
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.
1076
1125
1077
1126
*Default *: False
1078
1127
0 commit comments