Files
EchoChat/backend/go-service/config/config.dev.yaml
bujinyuan 63c6079667 feat(logs): 日志系统升级 — 文件轮转 + 分级存储
- 引入 lumberjack 实现日志文件自动轮转(按大小切割、保留数量、过期清理)
- app.log: 全量日志(JSON 格式),便于后期接入 ELK/Loki
- error.log: 仅 WARN 及以上级别,便于快速定位问题
- 控制台输出保持不变(彩色可读文本)
- 配置新增 log.file 节,支持 enable/dir/max_size/max_backups/max_age/compress

Made-with: Cursor
2026-02-28 15:15:00 +08:00

38 lines
578 B
YAML

server:
port: 8085
mode: debug
database:
host: localhost
port: 5432
user: echochat
password: echochat_dev_2026
dbname: echochat
sslmode: disable
max_idle_conns: 10
max_open_conns: 100
redis:
host: localhost
port: 6379
password: ""
db: 0
jwt:
secret: echochat-dev-jwt-secret-2026-please-change-in-production
access_expire_min: 120
refresh_expire_day: 7
issuer: echochat
log:
level: debug
format: text
output_path: stdout
file:
enable: true
dir: logs
max_size: 50
max_backups: 10
max_age: 30
compress: false