-
Notifications
You must be signed in to change notification settings - Fork 103
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
Support logging to stdout/stderr (for cloud deployment) #615
Comments
Thanks for opening this, i've been thinking about this for a while too. The steps you have makes sense to me. Here are a few suggestoins:
You can do this by propagating all the sub-loggers to main by specifying We can use something like MAILMAN_LOG_TO_STDOUT as a way to configure the containers for the same. I'd be happy to accept a PR if you open one for the same 👍🏽 |
This issue has not been updated for more than 1year |
When deploying in a cloud context (kubernetes in my case), one usually wants to send all logs to the container's stdout (in a coherent format) and collect them with some log aggregator (e.g. Promtail + Loki). Currently that is only possible for this image with some crude config overrides. My current workaround is:
[logging.*].path
settings to point to/dev/stdout
viamailman-extra.cfg
chown mailman /dev/stdout
before runningdocker-entrypoint.sh
via a custom container command (supplied in Pod spec)LOGGING
config variable viasettings_local.py
to redirect django logs to stdoutuwsgi.ini
into/opt/mailman-web
, replacing the container-packaged one and omitting all logger definitions (which makes UWSGI send logs to stdout by default)One or more dedicated environment variables to make the entire mailman suite switch to this logging behavior would be quite helpful and feel less hacky. I'd be willing to make a PR.
The text was updated successfully, but these errors were encountered: