This repository has been archived by the owner on Nov 30, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
Update log formatting so they can be masked if needed #837
Labels
enhancement
New feature or request
Comments
We should also remove this line in the Doing this and then running pylint will also point out all the places we need to change the f-string logs. |
awesome thanks @sanders41 |
10 tasks
10 tasks
sanders41
pushed a commit
that referenced
this issue
Aug 24, 2022
* Add a new Pii class and use it to wrap arguments not already wrapped with NonPii in those logs that are currently using %-style formatting. * Switch logging formatting to %-style instead of f-string. * Continue to address lingering f string instances, and wrap some arguments in Pii, such as raw exceptions. * Remove NotPii class and update tests. * Adjust errors made in %-style conversion. * Remove accidental Pii on print statements, update some PII wrappings. * Adjust string formatting of newly added log. * Update Changelog. * Fix missed closing curly brackets. * Remove missed curly brackets.
sanders41
pushed a commit
that referenced
this issue
Sep 22, 2022
* Add a new Pii class and use it to wrap arguments not already wrapped with NonPii in those logs that are currently using %-style formatting. * Switch logging formatting to %-style instead of f-string. * Continue to address lingering f string instances, and wrap some arguments in Pii, such as raw exceptions. * Remove NotPii class and update tests. * Adjust errors made in %-style conversion. * Remove accidental Pii on print statements, update some PII wrappings. * Adjust string formatting of newly added log. * Update Changelog. * Fix missed closing curly brackets. * Remove missed curly brackets.
6 tasks
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Is your feature request related to a specific problem?
Reticketed from #831. The "f string" formatting we use across the majority of our logs make them not maskable.
Update logging across the entire application to be a format we can mask and switch logging strategy to be
Pii
instead ofNotPii
h/t @eastandwestwind.Describe the solution you'd like
Pii
class and flip the logic to maskif Pii
instead of "don't mask if NotPii"%s formatting
, whose args are missing theNotPii
label and wrap their arguments inPii
. These are the only logs that we've been masking and we want to continue to do so.% style
formatting instead off-string
(154 info logs, 53 warnings, 17 errors).Pii
(there shouldn't be much. most of our logs don't contain real Pii).NotPii
class.Describe alternatives you've considered, if any
A description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: