Open melange396 opened 3 weeks ago
Ah I didn't know that! Do we have a space/documentation/reference for best practices like these?
https://github.com/cmu-delphi/covidcast-indicators/pull/2029#pullrequestreview-2270050125
Note: need to comeback once https://github.com/cmu-delphi/covidcast-indicators/issues/1268 is finished
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: