gunicorn icon indicating copy to clipboard operation
gunicorn copied to clipboard

Logging to journald

Open FedericoCeratto opened this issue 3 years ago • 1 comments

Gunicorn cannot log natively into journald it seems. As a workaround a log handler can be added at start time:

log = logging.getLogger("foo")
log.addHandler(JournalHandler(SYSLOG_IDENTIFIER="foo"))

However the access log format and the unit name cannot be customized.

FedericoCeratto avatar Jan 10 '22 22:01 FedericoCeratto

what about using a custom logging class? WOuld it work for you?

benoitc avatar Oct 14 '22 08:10 benoitc

no activity since awhile. closing feel free to create a new ticket if needed.

benoitc avatar Aug 06 '24 15:08 benoitc