全心思齐网

thread打印日志注意事项?

thread打印日志<?xml version="1.0" encoding="UTF-8"?> <configuration> <appender name="STDOUT" > <encoder> <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{5} - %msg%npattern> encoder> appender> <root level="DEBUG"> <appender-ref ref="STDOUT" /> root> <logger name="org.springframework" level="WARN"/> configuration>

可以全局输出为 info,把需要的包设置成 debug,相当于只看我需要的包下的 debug 信息,其它包的日志为 info 级别,比如我只想看自己项目包中的 debug 信息如 me.ele.ebu。

需要注意的是全局输出in fo比较困难,借用debug更符合生产实际。

匿名回答于2024-05-25 17:39:14


相关知识问答