change log

This commit is contained in:
2025-07-28 15:21:37 +08:00
parent 610d0f5475
commit 560c81a8aa
7 changed files with 1351 additions and 12 deletions

View File

@@ -47,6 +47,50 @@ logger:
max_age: 30
compress: true
use_daily: true
# 启用按级别分文件
enable_level_separation: true
# 各级别日志文件配置
level_configs:
debug:
max_size: 50 # 50MB
max_backups: 3
max_age: 7 # 7天
compress: true
info:
max_size: 100 # 100MB
max_backups: 5
max_age: 30 # 30天
compress: true
warn:
max_size: 100 # 100MB
max_backups: 5
max_age: 30 # 30天
compress: true
error:
max_size: 200 # 200MB
max_backups: 10
max_age: 90 # 90天
compress: true
fatal:
max_size: 100 # 100MB
max_backups: 10
max_age: 365 # 1年
compress: true
panic:
max_size: 100 # 100MB
max_backups: 10
max_age: 365 # 1年
compress: true
# 生产环境全面日志配置
comprehensive_logging:
enable_request_logging: true
enable_response_logging: true
enable_request_body_logging: false # 生产环境不记录请求体(安全考虑)
enable_error_logging: true
enable_business_logging: true
enable_performance_logging: true
max_body_size: 10240 # 10KB
exclude_paths: ["/health", "/metrics", "/favicon.ico", "/swagger"]
# ===========================================
# 🔐 JWT配置
# ===========================================