-
-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Summary
Add optional structured logging in JSON format for enterprise deployments.
Background
From production readiness audit (2025-12-13): Current logging is text-based. JSON structured logging enables better log aggregation and analysis.
Requirements
- Add `STATUSLINE_LOG_FORMAT=json` environment variable
- Output logs in JSON format when enabled
- Maintain backward compatibility (default: text format)
- Include standard fields (timestamp, level, message, context)
- Document in configuration guide
Current Format
[INFO] 2025-12-13 10:30:45 Module loading completed in 0.2s
[WARN] 2025-12-13 10:30:45 Cache module failed to load
JSON Format
{"timestamp":"2025-12-13T10:30:45Z","level":"INFO","message":"Module loading completed","duration_ms":200,"context":"module_loading"}
{"timestamp":"2025-12-13T10:30:45Z","level":"WARN","message":"Cache module failed to load","context":"main","module":"cache"}Use Cases
- Log aggregation systems (ELK, Splunk, CloudWatch)
- Structured analysis and alerting
- Enterprise compliance requirements
Implementation Location
- `lib/core.sh` - `debug_log()` function
Priority
🟢 Low Priority - Enterprise feature
References
- Production Readiness Report:
docs/production-readiness-report.md
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request