优化:降低访问日志噪声并增加日志文件轮转
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
Log volume optimization diff summary
|
||||
|
||||
1. apps/backend/src/middleware/access-log.ts
|
||||
- Successful GET/HEAD responses (2xx/3xx) now use DEBUG.
|
||||
- Writes and all 4xx/5xx responses remain INFO.
|
||||
|
||||
2. apps/backend/src/utils/logger.ts
|
||||
- Appends rotate at LOG_MAX_FILE_SIZE_MB (default 20MB).
|
||||
- Keeps LOG_MAX_FILES (default 5) files per channel/date.
|
||||
- Rotated files are included in retention cleanup.
|
||||
|
||||
3. Configuration/docs/tests
|
||||
- Added LOG_MAX_FILE_SIZE_MB and LOG_MAX_FILES to env overrides,
|
||||
Compose files, examples, runtime types, backend README, and tests.
|
||||
Reference in New Issue
Block a user