KmsLogging
Logging utilities and conventions for KMS operations.
This object provides standardized logging patterns to ensure consistency across all KMS plugins.
Logging Levels:
DEBUG: Detailed diagnostic information (key lookups, cache hits, etc.)
INFO: Important operational events (key generation, deletion, successful operations)
WARN: Warning conditions (validation failures, algorithm incompatibilities)
ERROR: Error conditions (API failures, unexpected exceptions)
Logging Format: Use SLF4J parameterized logging for better performance and structured logging:
logger.info("Operation completed: keyId={}, algorithm={}", keyId.value, algorithm.name)
logger.error("Operation failed: keyId={}, errorCode={}", keyId.value, errorCode, exception)Context Information: Always include relevant context in logs:
keyId: The key identifier
algorithm: The algorithm being used
operation: The operation being performed
errorCode/statusCode: HTTP or API error codes when available
requestId/correlationId: Request tracking IDs when available
Functions
Logs a key deletion operation.
Logs a successful signing operation.
Logs a warning condition (validation failures, incompatibilities, etc.).