Files
docs/adr/008-pino-backend-logging.md
T
2026-08-14 17:12:15 +03:00

16 lines
976 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 008. Pino для backend-логирования
**Status:** Accepted
## Context
Backend нуждается в структурированных JSON-логах с HTTP request context, уровнями, redaction и интеграцией с Nest. Самописный logger повторял бы эту инфраструктуру и переносил бы её сопровождение в проект.
## Decision
Использовать `nestjs-pino` как единственный backend logger. Он предоставляет Pino JSON stdout, request-scoped logging и интеграцию с Nest; безопасный набор HTTP-полей и redaction настраиваются в приложении.
## Consequences
Backend получает новую production dependency и использует Pino API для application-событий. Collector, retention и alerting остаются за пределами приложения.