Fix unstructured logging variable formatting #2025
Labels
bug
Something isn't working
devops
enhancement
future-solution
Solutions to problems we don't have yet but still dread
We use a logger in a lot of places in this repo, which is good! To make this structured logging as useful as it can be, the
event
argument (usually the first unnamed arg) should be a static string (to filter more easily), and each dynamic/varying value should be specified in an individual named argument to the logger call. Much of the logging usage here follows those rules, but not all -- among other reasons, i think a lot came from when we ported to more proper logging from dumbprint()
statements that had variables inserted mid-string and we didnt fix the format.As of right now, these are the files that seem to have the less-desired usage:
covidcast-indicators/quidel_covidtest/delphi_quidel_covidtest/pull.py
Line 59 in 2184da7
covidcast-indicators/changehc/delphi_changehc/update_sensor.py
Line 44 in 2184da7
covidcast-indicators/_delphi_utils_python/delphi_utils/runner.py
Line 63 in 2184da7
covidcast-indicators/google_symptoms/delphi_google_symptoms/patch.py
Line 61 in 2184da7
covidcast-indicators/claims_hosp/delphi_claims_hosp/modify_claims_drops.py
Line 60 in 2184da7
covidcast-indicators/google_symptoms/delphi_google_symptoms/run.py
Line 99 in 2184da7
covidcast-indicators/doctor_visits/delphi_doctor_visits/update_sensor.py
Line 37 in 2184da7
covidcast-indicators/_delphi_utils_python/delphi_utils/export.py
Lines 24 to 26 in 2184da7
covidcast-indicators/doctor_visits/delphi_doctor_visits/modify_claims_drops.py
Line 51 in 2184da7
covidcast-indicators/doctor_visits/delphi_doctor_visits/patch.py
Line 48 in 2184da7
covidcast-indicators/doctor_visits/delphi_doctor_visits/run.py
Line 91 in 2184da7
covidcast-indicators/_delphi_utils_python/delphi_utils/flash_eval/eval_day.py
Lines 156 to 157 in 2184da7
The text was updated successfully, but these errors were encountered: