logback.xml
public class Test {
private final static Logger logger = LoggerFactory.getLogger(Test.class);
public static void main(String[] args) {
logger.info("logback {}","INFO ( TRACE < DEBUG < INFO < WARN < ERROR )");
logger.error("logback {}","ERROR ( TRACE < DEBUG < INFO < WARN < ERROR )");
}
}
<configuration scan="false">
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%date{yyyyMMdd HH:mm:ss.SSS} %6level [%44.44logger{44}] %message%n%ex{1}</pattern>
</encoder>
</appender>
<logger name="com.citi.rio" level="INFO" />
<logger name="org.springframework" level="INFO" />
<root level="INFO">
<appender-ref ref="STDOUT" />
</root>
</configuration>