api: логирование через pino

Логгер на pino + nestjs-pino вместо стандартного ConsoleLogger: уровни
trace…fatal, details объектом, человекочитаемый вывод в dev и JSON в
проде,
автоматические HTTP-логи (reqId, url, statusCode, responseTime). Для
тестов —
LocalLoggerModule.forTesting() со своим TestingLogger и матчерами.

Документация по логированию — в docs/55-logging.
This commit is contained in:
arswarog committed 2026-10-27 10:44:15 +03:00
1 parent 157d79932a
commit bd6f349dc4
21 files changed
+1992 -11

No files matched your search

+5
View File
@@ -9,8 +9,12 @@
"@nestjs/swagger": "^11.4.7",
"@nestjs/terminus": "^11.1.1",
"axios": "^1.6.0",
"colorette": "^2.0.20",
"dotenv": "^16.4.7",
"nestjs-pino": "^4.4.1",
"pg": "^8.20.0",
"pino": "^9.11.0",
"pino-http": "^10.5.0",
"reflect-metadata": "^0.1.13",
"rxjs": "^7.8.0",
"typeorm": "^0.3.31"
@@ -18,6 +22,7 @@
"devDependencies": {
"@nestjs/schematics": "^11.0.0",
"@nestjs/testing": "^11.0.0",
"pino-pretty": "^13.1.1",
"webpack-cli": "^5.1.4"
}
}