mozilla / addons

☂ Umbrella repository for Mozilla Addons ✨
Other
125 stars 41 forks source link

Update our logging to have a unified logging-level #5569

Closed EnTeQuAk closed 6 years ago

EnTeQuAk commented 6 years ago

We are currently running into various problems:

We have too much logging (DEBUG) on -production and travis can't finish because we issue way too many log-statements. Let's fix this.

Looking at https://github.com/mozilla/addons-server/blob/master/src/olympia/lib/log_settings_base.py#L116-L117 we currently only set a log-level if none is already set. Unfortunately most of our loggers have already a log-level set, and this line disables our logging-overwrite in settings_test because it renders settings.LOG_LEVEL useless.

Let's instead not define any log-levels on our loggers and force a unified log-level across the board. Preferably DEBUG for local-development, -dev and -stage as well as INFO for TravisCI and production.

Raising the log-level may have to be coordinated with security team as they do some kind of anomaly detection if I remember correctly.

diox commented 6 years ago

https://github.com/diox/olympia/commit/cb503be0176d0c87e9b5788a16ccdae125633d6b is a start

It gets rid of the custom logging merging thing going on inside log_configure currently. It fixes the issues we've seen in tests having extra logging that we don't need.

Work left to do on this:

AlexandraMoga commented 6 years ago

Please add STR or the label 'qa:not needed'. Thanks!