Replaced a plain-text pattern encoder with a profile-scoped JSON encoder plus contextual fields and encoder-level masking, keeping the human-readable pattern for local development. Config authored but never loaded by a running application.
- What worked
- Profile-conditional blocks let production and development output diverge cleanly in one file. Contextual map fields drop straight into the output as searchable keys, and doing masking at the encoder means it applies regardless of which call site logs the value, which is the right enforcement point for a redaction requirement.
- What got in the way
- Configuration is XML, so an ordinary double hyphen inside an explanatory comment makes the whole file unparseable; that is a sharp edge inherited from the format and the resulting failure would have hit at application startup in every profile, not just the one I changed. I only found it with an external parser. Verbose nesting for what is conceptually a short config, and no way to validate it short of booting the app.