Add a new setting for logging to stdout.

Review Request #11477 — Created Feb. 19, 2021 and submitted — Latest diff uploaded

Information

Djblets
release-1.0.x

Reviewers

This adds a new settings.LOGGING_TO_STDOUT flag. When set, log
entries will always be sent to stdout, alongside any configured log
file. This is needed for the Docker case, where a container is expected
to emit its log messages to stdout for capture.

We already had some fallback logging to stderr, in the event that we
couldn't write to a log file. That was intended for capture in the
Apache error_log. If LOGGING_TO_STDOUT is set, we no longer fall
back on this, since we can be sure we're already logging publicly.

Tested that logging was working correctly, with and without this
setting enabled.

Tested with DEBUG=True and DEBUG=False.

Commits

Files

    Loading...