From 46e772683866854641a547d8b9dfd1d19aab0f3b Mon Sep 17 00:00:00 2001 From: Benoit Chesneau Date: Fri, 23 Jan 2026 10:08:01 +0100 Subject: [PATCH] fix: make syslog_addr default platform-neutral in docs The syslog_addr setting has different defaults depending on the platform (macOS, FreeBSD, OpenBSD, Linux). Added default_doc to show all platform-specific defaults in the documentation, ensuring consistent output regardless of which platform generates the docs. Also kept the diagnostic git diff in CI for future debugging. --- docs/content/reference/settings.md | 9 ++++++++- gunicorn/config.py | 9 +++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/docs/content/reference/settings.md b/docs/content/reference/settings.md index 018a0793..52cd3152 100644 --- a/docs/content/reference/settings.md +++ b/docs/content/reference/settings.md @@ -285,7 +285,14 @@ Format: https://docs.python.org/3/library/logging.config.html#logging.config.jso **Command line:** `--log-syslog-to SYSLOG_ADDR` -**Default:** `'unix:///var/run/syslog'` +**Default:** + +Platform-specific: + +* macOS: ``'unix:///var/run/syslog'`` +* FreeBSD/DragonFly: ``'unix:///var/run/log'`` +* OpenBSD: ``'unix:///dev/log'`` +* Linux/other: ``'udp://localhost:514'`` Address to send syslog messages. diff --git a/gunicorn/config.py b/gunicorn/config.py index 2dcf64d0..eb93857b 100644 --- a/gunicorn/config.py +++ b/gunicorn/config.py @@ -1568,6 +1568,15 @@ class SyslogTo(Setting): else: default = "udp://localhost:514" + default_doc = """\ + Platform-specific: + + * macOS: ``'unix:///var/run/syslog'`` + * FreeBSD/DragonFly: ``'unix:///var/run/log'`` + * OpenBSD: ``'unix:///dev/log'`` + * Linux/other: ``'udp://localhost:514'`` + """ + desc = """\ Address to send syslog messages.