Why this matters
Structured logs are machine-parsable for search and alerting.
Prefer key-value or JSON logging over string concatenation; include correlation/request IDs from CoroutineContext when available.
Structured logs are machine-parsable for search and alerting.
Side-by-side examples engineers can pattern-match during review.
logger.info("User " + id + " logged in")logger.info("user_login", mapOf("userId" to id, "requestId" to reqId))logger.error("fail: $e")logger.error("op_failed", mapOf("err" to e))From the same buckets as this rule.
Never emit Primary Account Number (PAN) or Sensitive Authentication Data (SAD: CVV/CVC, full track data, PIN) to application or audit logs. Per PCI DSS 4.0 Req. 3 and 10, always mask PAN as first6last4 and fully redact SAD before logging.