@@ -202,6 +202,7 @@ Version Guard is configured via environment variables or CLI flags:
202202| ` TAG_APP_KEYS ` | Comma-separated AWS tag keys for app/service | ` app,application,service ` |
203203| ` TAG_ENV_KEYS ` | Comma-separated AWS tag keys for environment | ` environment,env ` |
204204| ` TAG_BRAND_KEYS ` | Comma-separated AWS tag keys for brand/business unit | ` brand ` |
205+ | ` --verbose ` / ` -v ` | Enable debug-level logging | ` false ` |
205206
206207** Customizing AWS Tag Keys:**
207208
@@ -217,6 +218,36 @@ export TAG_APP_KEYS="team,squad,application"
217218
218219The tag keys are tried in order — the first matching tag wins.
219220
221+ ** Logging:**
222+
223+ Version Guard uses structured JSON logging via Go's ` log/slog ` package for production observability:
224+
225+ ``` bash
226+ # Run with debug-level logging
227+ ./bin/version-guard --verbose
228+
229+ # Production mode (info-level logging only)
230+ ./bin/version-guard
231+ ```
232+
233+ Logs are output in JSON format for easy parsing by log aggregation tools (Datadog, Splunk, CloudWatch Insights):
234+
235+ ``` json
236+ {
237+ "time" : " 2024-01-15T10:30:45Z" ,
238+ "level" : " WARN" ,
239+ "msg" : " failed to detect drift for resource" ,
240+ "resource_id" : " arn:aws:rds:us-west-2:123456789012:cluster:my-db" ,
241+ "error" : " version not found in EOL database"
242+ }
243+ ```
244+
245+ Benefits:
246+ - Machine-readable structured data with typed fields
247+ - Context-aware logging with trace IDs
248+ - Queryable logs (e.g., filter by ` resource_id ` or ` error ` )
249+ - Integrates seamlessly with observability platforms
250+
220251See ` ./bin/version-guard --help ` for all options.
221252
222253## 🎨 Classification Policy
0 commit comments