Exception

log 단계

Jungsoomin :) 2020. 8. 20. 12:08

ALL < DEBUG < INFO < WARN <ERROR < FATAL < OFF

 

 

ROOT 로거의 레벨에 따라 로그 출력의 레벨이 달라지며, 개별로그가 ROOT 로거의 레벨보다 낮더라도 ROOT로거의 레벨이 높다면 출력되지 못한다.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE log4j:configuration PUBLIC "-//APACHE//DTD LOG4J 1.2//EN" "log4j.dtd">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">

	<!-- Appenders -->
	<appender name="console" class="org.apache.log4j.ConsoleAppender">
		<param name="Target" value="System.out" />
		<layout class="org.apache.log4j.PatternLayout">
			<param name="ConversionPattern" value="%-5p: %c - %m%n" />
		</layout>
	</appender>
	
	<!-- Application Loggers -->
	<logger name="com.soomin.controller">
		<level value="info" />
	</logger>
	
	<!-- 3rdparty Loggers -->
	<logger name="org.springframework.core">
		<level value="info" />
	</logger>	
	
	<logger name="org.springframework.beans">
		<level value="info" />
	</logger>
	
	<logger name="org.springframework.context">
		<level value="info" />
	</logger>

	<logger name="org.springframework.web">
		<level value="info" />
	</logger>

	<!-- Root Logger -->
	<root>
		<priority value="DEBUG" />
		<appender-ref ref="console" />
	</root>
	
</log4j:configuration>