当前位置: 代码迷 >> 综合 >> warn no appenders could be found for logger(io.netty.util.internal.logging.....)
  详细解决方案

warn no appenders could be found for logger(io.netty.util.internal.logging.....)

热度:110   发布时间:2023-11-19 20:34:37.0

解惑

缺少log4j.properties配置文件

1、在src下面新建一个log4j.properties文件

2、内容可以如下

# Configure logging for testing: optionally with log file
#\u53EF\u4EE5\u8BBE\u7F6E\u7EA7\u522B\uFF1Adebug>info>error
#debug:\u53EF\u4EE5\u663E\u5F0Fdebug,info,error
#info:\u53EF\u4EE5\u663E\u5F0Finfo,error
#error:\u53EF\u4EE5\u663E\u5F0Ferrorlog4j.rootLogger=debug,appender1
#log4j.rootLogger=info,appender1
#log4j.rootLogger=error,appender1#\u8F93\u51FA\u5230\u63A7\u5236\u53F0
log4j.appender.appender1=org.apache.log4j.ConsoleAppender
#\u6837\u5F0F\u4E3ATTCCLayout
log4j.appender.appender1.layout=org.apache.log4j.TTCCLayout

 

  相关解决方案