feat-json-logs
✨ New Features
[Opt-in JSON log lines]
Goal: Collectors such as Datadog index a line when the whole line is one JSON object. The text line stays the default for everyone else.
Solution: /config/settings.yaml logger.format is text (default) or json, read at process start with the other logger settings. Text lines print operator labels as key=value. JSON lines use status, ISO timestamp, root labels, and nested data. Nest bootstrap and the process catch go through the same logger.
Features:
format: jsonswitches stdout and/data/logtogether- Text
extraFieldsareenv=prod site=plant-42, quoted when the value has a space or= - Missing or unknown
formatkeeps the historical text line
Files Modified:
src/core/logger/- format switch, logfmt labels, JSON line, Winston output testsrc/main.ts- NestFactory and bootstrap failure useLoggerServicedocs/user/operations/custom-logging.md- EN / FR