Structured Logging (ARCH3158)
Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.
Key typescript.logging.structured-logging · Severity warning · Category logging
Embedding values into a log message via string interpolation or concatenation hurts log aggregation and filtering. Values should be passed as separate structured fields.
Incorrect
Section titled “Incorrect”logger.info(`user ${userId} performed ${action}`);Correct
Section titled “Correct”logger.info("user performed action", { userId, action });Pass values as structured fields rather than embedding them in the message string.