Tag Archives: log4j2

Spring 4 framework + wildfly 20 log4j2 無法產生 log

解決這個問題需要做以下處理:

修改 wildfly logging 設定
Configuration > Subsystems > Logging > Configuration
將 Add Logging Api Dependencies 改為 false
maven pom 檔有以下 dependency

    <dependency>
    	<groupId>org.slf4j</groupId>
    	<artifactId>slf4j-api</artifactId>
    	<version>1.7.30</version>
    </dependency>
    <dependency>
    	<groupId>org.apache.logging.log4j</groupId>
    	<artifactId>log4j-core</artifactId>
    	<version>2.13.3</version>
    </dependency>
    <dependency>
    	<groupId>org.apache.logging.log4j</groupId>
    	<artifactId>log4j-api</artifactId>
    	<version>2.13.3</version>
    </dependency>
    <dependency>
    	<groupId>org.apache.logging.log4j</groupId>
    	<artifactId>log4j-slf4j-impl</artifactId>
    	<version>2.13.3</version>
    </dependency>
    <dependency>
    	<groupId>org.apache.logging.log4j</groupId>
    	<artifactId>log4j-jcl</artifactId>
    	<version>2.13.3</version>
    </dependency>
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...