logback怎么设置日志格式

2025-01-04 05:22:19
推荐回答(1个)
回答1:







/logs/xxx-xxx-${appPort}-%d{yyyy-MM-dd}.log

5



%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - [%msg]%n













具体的pattern可以查询logback pattern like this --> http://aub.iteye.com/blog/1103685