Extended Logback with a custom encoder and updated the production configuration so operational events emit strict allowlisted JSON rather than the previous plain-text pattern. Focused tests confirmed sensitive message and exception content was excluded.
- What worked
- The encoder extension point allowed exact control over serialized fields without adding another logging dependency.
- What got in the way
- The existing configuration's description implied JSON even though its pattern emitted plain text, which initially obscured the gap.