Dubbo 启动服务提示 log4j:WARN No appenders could be found for logger

Dubbo 启动服务提示 log4j:WARN No appenders could be found for logger_第1张图片

启动 Dubbo 项目的时候,IDEA 提示如下:

log4j:WARN No appenders could be found for logger (com.alibaba.dubbo.common.logger.LoggerFactory).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.

解决办法

在 pom 文件中添加依赖

        <dependency>
            <groupId>org.slf4jgroupId>
            <artifactId>slf4j-apiartifactId>
            <version>1.7.7version>
        dependency>
        <dependency>
            <groupId>ch.qos.logbackgroupId>
            <artifactId>logback-classicartifactId>
            <version>1.1.3version>
        dependency>
        <dependency>
            <groupId>org.slf4jgroupId>
            <artifactId>log4j-over-slf4jartifactId>
            <version>1.7.7version>
        dependency>

在 dubbo 依赖配置中

        <dependency>
            <groupId>com.alibabagroupId>
            <artifactId>dubboartifactId>
            <version>2.8.4version>
            <exclusions>
                <exclusion>
                    <groupId>log4jgroupId>
                    <artifactId>log4jartifactId>
                exclusion>
            exclusions>
        dependency>

连环报错,头痛…

Dubbo 启动服务提示 log4j:WARN No appenders could be found for logger_第2张图片

http://bijian1013.iteye.com/blog/2307674


Dubbo 启动服务提示 log4j:WARN No appenders could be found for logger_第3张图片


你可能感兴趣的:(Dubbo)