Problem
The README promises features that are incomplete or not wired into generated projects:
- JSON logging —
log_format="json" is accepted by FastStackConfig but silently ignored. Only console text output works. README says "JSON + console dual-format".
- Sensitive data masking —
masking.py has the code, FastStackConfig.sensitive_fields accepts the config, but nothing connects them.
- Generated
main.py ignores user settings — hardcodes FastStackConfig(app_version="0.1.0") instead of reading LOG_LEVEL from .env via settings.
Fix
- Wire
log_format and sensitive_fields into StructuredLogger.setup()
- Add JSON formatter using
python-json-logger (already a dependency)
- Wire masking filter into the logger when
sensitive_fields is configured
- Update
main.py.j2 to pass settings.log_level to FastStackConfig
- Add tests for JSON output and masking integration
Acceptance criteria
log_format="json" produces JSON log output
sensitive_fields=["password"] masks values in logs
- Generated
main.py reads LOG_LEVEL from .env
- All existing tests still pass
Problem
The README promises features that are incomplete or not wired into generated projects:
log_format="json"is accepted byFastStackConfigbut silently ignored. Only console text output works. README says "JSON + console dual-format".masking.pyhas the code,FastStackConfig.sensitive_fieldsaccepts the config, but nothing connects them.main.pyignores user settings — hardcodesFastStackConfig(app_version="0.1.0")instead of readingLOG_LEVELfrom.envviasettings.Fix
log_formatandsensitive_fieldsintoStructuredLogger.setup()python-json-logger(already a dependency)sensitive_fieldsis configuredmain.py.j2to passsettings.log_leveltoFastStackConfigAcceptance criteria
log_format="json"produces JSON log outputsensitive_fields=["password"]masks values in logsmain.pyreadsLOG_LEVELfrom.env