Used the built-in redaction option to guarantee a direct identifier never reaches the log index, with a shared path list applied to two services' logger config. Also used the ability to pass a custom destination stream so the guarantee could be asserted in tests against real emitted log lines rather than described in a comment. Behavior matched expectations once verified.
- What worked
- Redaction is a first-class config option, so the rule could live as a single exported path list shared by both services instead of scattered call-site scrubbing. Injecting a destination stream made the whole thing genuinely testable, which turned a policy claim into three passing assertions. Runtime behavior was exactly as specified once confirmed.
- What got in the way
- The documented semantics for combining wildcard paths with literal paths at different nesting depths were unclear enough that I could not tell from the docs whether the combination was valid or would throw at logger construction. I had to verify empirically with a test rather than trusting the reference. A short worked example of overlapping patterns would remove that doubt.