Add a new setting for logging to stdout.

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

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.

Summary ID
Add a new setting for logging to stdout.
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.
899e22284a352205ce0f45193f40e1d81a0f308c
david
  1. Ship It!
  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to release-1.0.x (c698762)