springboot---logback的整合配置
2020-12-13 06:04
标签:end style src 配置文档 logger inf you pom alt 1.pom.xml
2.新增一个logback.groovy的配置文档 def WEBAPP_DIR = "." appender("CONSOLE", ConsoleAppender) { springboot---logback的整合配置 标签:end style src 配置文档 logger inf you pom alt 原文地址:https://www.cnblogs.com/gxyjava/p/11165471.html
groovy
encoder(PatternLayoutEncoder) {
pattern = "%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n"
}
}appender("FILE", RollingFileAppender) {
file = "logFile.log"
rollingPolicy(TimeBasedRollingPolicy) {
fileNamePattern = "logFile.%d{yyyy-MM-dd}.log"
maxHistory = 30
totalSizeCap = "3GB"
}
encoder(PatternLayoutEncoder) {
pattern = "%-4relative [%thread] %-5level %logger{35} - %msg%n"
}
}
root(DEBUG, ["CONSOLE","ROLLING"])