Zum Inhalt springen

Structured Logging (ARCH8158)

Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.

Key kotlin.logging.structured-logging · Severity info · Category logging

Flags string templates / concatenation inside logger calls - the message is formatted even when the level is off and the values are not structured.

logger.info("user $userId logged in from $ip")
logger.info("user {} logged in from {}", userId, ip)

Use the logger’s placeholder syntax with arguments.