Skip to content

Commit

Permalink
feat(pp): WIP: log redaction
Browse files Browse the repository at this point in the history
  • Loading branch information
favonia committed Jul 1, 2024
1 parent 3b42131 commit a7651bc
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/pp/level.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const (
Notice // an action (e.g., changing the IP) has happened and it is not an error
Warning // non-fatal errors where the updater should continue updating IP addresses
Error // fatal errors where the updater should stop
DefaultLevel = Info
Verbose = Info
Quiet = Notice
DefaultLevel Level = Info
Verbose Level = Info
Quiet Level = Notice
)
19 changes: 19 additions & 0 deletions internal/pp/redaction.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package pp

type RedactionLevel int

const (
RedactNone RedactionLevel = iota
// This level reveals everything.

RedactToken
// This level conceals tokens or token-like information.

RedactPrivate
// This level conceals information that cannot be easily
// owned by other people at the same time, including
// token-like information, domain names, IP addresses,
// zone IDs, and record IDs.

RedactDefault RedactionLevel = RedactToken
)

0 comments on commit a7651bc

Please sign in to comment.