Introduce log4j 2 for Spring's test suite
This commit adds a test runtime dependency on log4j 2 for every project and migrates all log4j.properties files to log4j2-test.xml files. Issue: SPR-14431
This commit is contained in:
parent
9a9551bf18
commit
1391248ea6
|
@ -58,6 +58,7 @@ configure(allprojects) { project ->
|
||||||
ext.junitVersion = "4.12"
|
ext.junitVersion = "4.12"
|
||||||
ext.junitJupiterVersion = '5.0.0-SNAPSHOT'
|
ext.junitJupiterVersion = '5.0.0-SNAPSHOT'
|
||||||
ext.junitPlatformVersion = '1.0.0-SNAPSHOT'
|
ext.junitPlatformVersion = '1.0.0-SNAPSHOT'
|
||||||
|
ext.log4JVersion = '2.6.1'
|
||||||
ext.nettyVersion = "4.1.1.Final"
|
ext.nettyVersion = "4.1.1.Final"
|
||||||
ext.okhttpVersion = "2.7.5"
|
ext.okhttpVersion = "2.7.5"
|
||||||
ext.okhttp3Version = "3.3.1"
|
ext.okhttp3Version = "3.3.1"
|
||||||
|
@ -139,6 +140,9 @@ configure(allprojects) { project ->
|
||||||
}
|
}
|
||||||
testCompile("org.hamcrest:hamcrest-all:${hamcrestVersion}")
|
testCompile("org.hamcrest:hamcrest-all:${hamcrestVersion}")
|
||||||
|
|
||||||
|
testRuntime("org.apache.logging.log4j:log4j-core:${log4JVersion}")
|
||||||
|
testRuntime("org.apache.logging.log4j:log4j-jcl:${log4JVersion}")
|
||||||
|
|
||||||
sniffer("org.codehaus.mojo:animal-sniffer-ant-tasks:${snifferVersion}")
|
sniffer("org.codehaus.mojo:animal-sniffer-ant-tasks:${snifferVersion}")
|
||||||
javaApiSignature("org.codehaus.mojo.signature:java18:1.0@signature")
|
javaApiSignature("org.codehaus.mojo.signature:java18:1.0@signature")
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
log4j.appender.console=org.apache.log4j.ConsoleAppender
|
|
||||||
log4j.appender.console.layout=org.apache.log4j.PatternLayout
|
|
||||||
log4j.appender.console.layout.ConversionPattern=%d{HH:mm:ss,SSS} [%c] - %m%n
|
|
||||||
|
|
||||||
log4j.rootCategory=WARN, console
|
|
||||||
log4j.logger.org.springframework.beans=WARN
|
|
||||||
log4j.logger.org.springframework.binding=DEBUG
|
|
||||||
|
|
||||||
#log4j.logger.org.springframework.aop=TRACE
|
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Configuration status="WARN">
|
||||||
|
<Appenders>
|
||||||
|
<Console name="Console" target="SYSTEM_OUT">
|
||||||
|
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" />
|
||||||
|
</Console>
|
||||||
|
</Appenders>
|
||||||
|
<Loggers>
|
||||||
|
<Logger name="org.springframework.aop" level="warn" />
|
||||||
|
<Root level="error">
|
||||||
|
<AppenderRef ref="Console" />
|
||||||
|
</Root>
|
||||||
|
</Loggers>
|
||||||
|
</Configuration>
|
|
@ -1,9 +0,0 @@
|
||||||
log4j.appender.console=org.apache.log4j.ConsoleAppender
|
|
||||||
log4j.appender.console.layout=org.apache.log4j.PatternLayout
|
|
||||||
log4j.appender.console.layout.ConversionPattern=%d{HH:mm:ss,SSS} [%c] - %m%n
|
|
||||||
|
|
||||||
log4j.rootCategory=WARN, console
|
|
||||||
log4j.logger.org.springframework.beans=WARN
|
|
||||||
log4j.logger.org.springframework.binding=DEBUG
|
|
||||||
|
|
||||||
#log4j.logger.org.springframework=TRACE
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Configuration status="WARN">
|
||||||
|
<Appenders>
|
||||||
|
<Console name="Console" target="SYSTEM_OUT">
|
||||||
|
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" />
|
||||||
|
</Console>
|
||||||
|
</Appenders>
|
||||||
|
<Loggers>
|
||||||
|
<Logger name="org.springframework.beans" level="warn" />
|
||||||
|
<Root level="error">
|
||||||
|
<AppenderRef ref="Console" />
|
||||||
|
</Root>
|
||||||
|
</Loggers>
|
||||||
|
</Configuration>
|
|
@ -1,9 +0,0 @@
|
||||||
log4j.appender.console=org.apache.log4j.ConsoleAppender
|
|
||||||
log4j.appender.console.layout=org.apache.log4j.PatternLayout
|
|
||||||
log4j.appender.console.layout.ConversionPattern=%d{HH:mm:ss,SSS} [%c] - %m%n
|
|
||||||
|
|
||||||
log4j.rootCategory=ERROR, console
|
|
||||||
log4j.logger.org.springframework.beans.factory.config.DeprecatedBeanWarnerTests$MyDeprecatedBeanWarner=WARN
|
|
||||||
|
|
||||||
#log4j.logger.org.springframework.beans=TRACE
|
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Configuration status="WARN">
|
||||||
|
<Appenders>
|
||||||
|
<Console name="Console" target="SYSTEM_OUT">
|
||||||
|
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" />
|
||||||
|
</Console>
|
||||||
|
</Appenders>
|
||||||
|
<Loggers>
|
||||||
|
<Logger name="org.springframework.beans" level="warn" />
|
||||||
|
<Root level="error">
|
||||||
|
<AppenderRef ref="Console" />
|
||||||
|
</Root>
|
||||||
|
</Loggers>
|
||||||
|
</Configuration>
|
|
@ -1,10 +0,0 @@
|
||||||
log4j.appender.console=org.apache.log4j.ConsoleAppender
|
|
||||||
log4j.appender.console.layout=org.apache.log4j.PatternLayout
|
|
||||||
log4j.appender.console.layout.ConversionPattern=%d{HH:mm:ss,SSS} [%c] - %m%n
|
|
||||||
|
|
||||||
log4j.rootCategory=WARN, console
|
|
||||||
log4j.logger.org.springframework.beans=WARN
|
|
||||||
log4j.logger.org.springframework.binding=DEBUG
|
|
||||||
|
|
||||||
#log4j.logger.org.springframework.cache=TRACE
|
|
||||||
#log4j.logger.org.springframework.mail=TRACE
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Configuration status="WARN">
|
||||||
|
<Appenders>
|
||||||
|
<Console name="Console" target="SYSTEM_OUT">
|
||||||
|
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" />
|
||||||
|
</Console>
|
||||||
|
</Appenders>
|
||||||
|
<Loggers>
|
||||||
|
<Logger name="org.springframework.beans" level="warn" />
|
||||||
|
<Logger name="org.springframework.cache" level="warn" />
|
||||||
|
<Logger name="org.springframework.mail" level="warn" />
|
||||||
|
<Root level="error">
|
||||||
|
<AppenderRef ref="Console" />
|
||||||
|
</Root>
|
||||||
|
</Loggers>
|
||||||
|
</Configuration>
|
|
@ -53,6 +53,7 @@ import static org.junit.Assert.*;
|
||||||
*
|
*
|
||||||
* @author Chris Beams
|
* @author Chris Beams
|
||||||
* @author Juergen Hoeller
|
* @author Juergen Hoeller
|
||||||
|
* @author Sam Brannen
|
||||||
*/
|
*/
|
||||||
public class AutowiredConfigurationTests {
|
public class AutowiredConfigurationTests {
|
||||||
|
|
||||||
|
@ -203,20 +204,23 @@ public class AutowiredConfigurationTests {
|
||||||
|
|
||||||
TestBean testBean = context.getBean("testBean", TestBean.class);
|
TestBean testBean = context.getBean("testBean", TestBean.class);
|
||||||
assertThat(testBean.getName(), equalTo("localhost"));
|
assertThat(testBean.getName(), equalTo("localhost"));
|
||||||
assertThat(testBean.getAge(), equalTo((int) new ClassPathResource("log4j.properties").contentLength()));
|
assertThat(testBean.getAge(), equalTo(contentLength()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testCustomPropertiesWithGenericContext() throws IOException {
|
public void testCustomPropertiesWithGenericContext() throws IOException {
|
||||||
GenericApplicationContext context = new GenericApplicationContext();
|
GenericApplicationContext context = new GenericApplicationContext();
|
||||||
// context.setResourceLoader(new FileSystemResourceLoader());
|
|
||||||
new XmlBeanDefinitionReader(context).loadBeanDefinitions(
|
new XmlBeanDefinitionReader(context).loadBeanDefinitions(
|
||||||
new ClassPathResource("AutowiredConfigurationTests-custom.xml", AutowiredConfigurationTests.class));
|
new ClassPathResource("AutowiredConfigurationTests-custom.xml", AutowiredConfigurationTests.class));
|
||||||
context.refresh();
|
context.refresh();
|
||||||
|
|
||||||
TestBean testBean = context.getBean("testBean", TestBean.class);
|
TestBean testBean = context.getBean("testBean", TestBean.class);
|
||||||
assertThat(testBean.getName(), equalTo("localhost"));
|
assertThat(testBean.getName(), equalTo("localhost"));
|
||||||
assertThat(testBean.getAge(), equalTo((int) new ClassPathResource("log4j.properties").contentLength()));
|
assertThat(testBean.getAge(), equalTo(contentLength()));
|
||||||
|
}
|
||||||
|
|
||||||
|
private int contentLength() throws IOException {
|
||||||
|
return (int) new ClassPathResource("do_not_delete_me.txt").contentLength();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -477,7 +481,7 @@ public class AutowiredConfigurationTests {
|
||||||
this.hostname = hostname;
|
this.hostname = hostname;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Value("log4j.properties")
|
@Value("do_not_delete_me.txt")
|
||||||
public void setResource(Resource resource) {
|
public void setResource(Resource resource) {
|
||||||
this.resource = resource;
|
this.resource = resource;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2015 the original author or authors.
|
* Copyright 2002-2016 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -29,6 +29,7 @@ import java.util.Properties;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.apache.commons.logging.LogFactory;
|
||||||
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
import org.springframework.beans.factory.ObjectFactory;
|
import org.springframework.beans.factory.ObjectFactory;
|
||||||
|
@ -61,6 +62,7 @@ import static org.junit.Assert.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Juergen Hoeller
|
* @author Juergen Hoeller
|
||||||
|
* @author Sam Brannen
|
||||||
* @since 3.0
|
* @since 3.0
|
||||||
*/
|
*/
|
||||||
public class ApplicationContextExpressionTests {
|
public class ApplicationContextExpressionTests {
|
||||||
|
@ -326,11 +328,10 @@ public class ApplicationContextExpressionTests {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void resourceInjection() throws IOException {
|
public void resourceInjection() throws IOException {
|
||||||
System.setProperty("logfile", "log4j.properties");
|
System.setProperty("logfile", "do_not_delete_me.txt");
|
||||||
try {
|
try (AnnotationConfigApplicationContext ac = new AnnotationConfigApplicationContext(ResourceInjectionBean.class)) {
|
||||||
AnnotationConfigApplicationContext ac = new AnnotationConfigApplicationContext(ResourceInjectionBean.class);
|
|
||||||
ResourceInjectionBean resourceInjectionBean = ac.getBean(ResourceInjectionBean.class);
|
ResourceInjectionBean resourceInjectionBean = ac.getBean(ResourceInjectionBean.class);
|
||||||
Resource resource = new ClassPathResource("log4j.properties");
|
Resource resource = new ClassPathResource("do_not_delete_me.txt");
|
||||||
assertEquals(resource, resourceInjectionBean.resource);
|
assertEquals(resource, resourceInjectionBean.resource);
|
||||||
assertEquals(resource.getURL(), resourceInjectionBean.url);
|
assertEquals(resource.getURL(), resourceInjectionBean.url);
|
||||||
assertEquals(resource.getURI(), resourceInjectionBean.uri);
|
assertEquals(resource.getURI(), resourceInjectionBean.uri);
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
Please do not delete me; otherwise, you'll break some tests.
|
|
@ -1,9 +0,0 @@
|
||||||
log4j.appender.console=org.apache.log4j.ConsoleAppender
|
|
||||||
log4j.appender.console.layout=org.apache.log4j.PatternLayout
|
|
||||||
log4j.appender.console.layout.ConversionPattern=%d{HH:mm:ss,SSS} [%c] - %m%n
|
|
||||||
|
|
||||||
log4j.rootCategory=WARN, console
|
|
||||||
log4j.logger.org.springframework.core=INFO
|
|
||||||
|
|
||||||
#log4j.logger.org.springframework=TRACE
|
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Configuration status="WARN">
|
||||||
|
<Appenders>
|
||||||
|
<Console name="Console" target="SYSTEM_OUT">
|
||||||
|
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" />
|
||||||
|
</Console>
|
||||||
|
</Appenders>
|
||||||
|
<Loggers>
|
||||||
|
<Logger name="org.springframework.core" level="warn" />
|
||||||
|
<Root level="error">
|
||||||
|
<AppenderRef ref="Console" />
|
||||||
|
</Root>
|
||||||
|
</Loggers>
|
||||||
|
</Configuration>
|
|
@ -1,11 +0,0 @@
|
||||||
log4j.appender.console=org.apache.log4j.ConsoleAppender
|
|
||||||
log4j.appender.console.layout=org.apache.log4j.PatternLayout
|
|
||||||
log4j.appender.console.layout.ConversionPattern=%d{HH:mm:ss,SSS} [%c] - %m%n
|
|
||||||
|
|
||||||
log4j.rootCategory=WARN, console
|
|
||||||
log4j.logger.org.springframework.core.convert=WARN
|
|
||||||
log4j.logger.org.springframework.core.GenericTypeResolver=WARN
|
|
||||||
|
|
||||||
#log4j.logger.org.springframework.core=TRACE
|
|
||||||
#log4j.logger.org.springframework.util=TRACE
|
|
||||||
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Configuration status="WARN">
|
||||||
|
<Appenders>
|
||||||
|
<Console name="Console" target="SYSTEM_OUT">
|
||||||
|
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" />
|
||||||
|
</Console>
|
||||||
|
<File name="File" fileName="build/logs/spring-test.log">
|
||||||
|
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" />
|
||||||
|
</File>
|
||||||
|
</Appenders>
|
||||||
|
<Loggers>
|
||||||
|
<Logger name="org.springframework.core" level="info" />
|
||||||
|
<Logger name="org.springframework.core.convert" level="warn" />
|
||||||
|
<Logger name="org.springframework.core.GenericTypeResolver" level="warn" />
|
||||||
|
<Logger name="org.springframework.util" level="warn" />
|
||||||
|
<Root level="error">
|
||||||
|
<AppenderRef ref="Console" />
|
||||||
|
<AppenderRef ref="File" />
|
||||||
|
</Root>
|
||||||
|
</Loggers>
|
||||||
|
</Configuration>
|
|
@ -1,10 +0,0 @@
|
||||||
log4j.appender.console=org.apache.log4j.ConsoleAppender
|
|
||||||
log4j.appender.console.layout=org.apache.log4j.PatternLayout
|
|
||||||
log4j.appender.console.layout.ConversionPattern=%d{HH:mm:ss,SSS} [%c] - %m%n
|
|
||||||
|
|
||||||
log4j.rootCategory=WARN, console
|
|
||||||
log4j.logger.org.springframework.beans=WARN
|
|
||||||
log4j.logger.org.springframework.binding=DEBUG
|
|
||||||
|
|
||||||
#log4j.logger.org.springframework.expression=TRACE
|
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Configuration status="WARN">
|
||||||
|
<Appenders>
|
||||||
|
<Console name="Console" target="SYSTEM_OUT">
|
||||||
|
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" />
|
||||||
|
</Console>
|
||||||
|
</Appenders>
|
||||||
|
<Loggers>
|
||||||
|
<Logger name="org.springframework.expression" level="warn" />
|
||||||
|
<Root level="error">
|
||||||
|
<AppenderRef ref="Console" />
|
||||||
|
</Root>
|
||||||
|
</Loggers>
|
||||||
|
</Configuration>
|
|
@ -1,10 +0,0 @@
|
||||||
log4j.appender.console=org.apache.log4j.ConsoleAppender
|
|
||||||
log4j.appender.console.layout=org.apache.log4j.PatternLayout
|
|
||||||
log4j.appender.console.layout.ConversionPattern=%d{HH:mm:ss,SSS} [%c] - %m%n
|
|
||||||
|
|
||||||
log4j.rootCategory=WARN, console
|
|
||||||
log4j.logger.org.springframework.beans=WARN
|
|
||||||
log4j.logger.org.springframework.binding=DEBUG
|
|
||||||
|
|
||||||
#log4j.logger.org.springframework.instrument=TRACE
|
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Configuration status="WARN">
|
||||||
|
<Appenders>
|
||||||
|
<Console name="Console" target="SYSTEM_OUT">
|
||||||
|
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" />
|
||||||
|
</Console>
|
||||||
|
</Appenders>
|
||||||
|
<Loggers>
|
||||||
|
<Root level="error">
|
||||||
|
<AppenderRef ref="Console" />
|
||||||
|
</Root>
|
||||||
|
</Loggers>
|
||||||
|
</Configuration>
|
|
@ -1,16 +0,0 @@
|
||||||
log4j.appender.console=org.apache.log4j.ConsoleAppender
|
|
||||||
log4j.appender.console.layout=org.apache.log4j.PatternLayout
|
|
||||||
log4j.appender.console.layout.ConversionPattern=%d{HH:mm:ss,SSS} [%-5p] [%c] - %m%n
|
|
||||||
|
|
||||||
log4j.appender.file=org.apache.log4j.FileAppender
|
|
||||||
log4j.appender.file.file=bin/spring-jdbc.log
|
|
||||||
log4j.appender.file.layout=org.apache.log4j.PatternLayout
|
|
||||||
log4j.appender.file.layout.ConversionPattern=%d{HH:mm:ss,SSS} [%c] - %m%n
|
|
||||||
|
|
||||||
log4j.rootCategory=ERROR, console, file
|
|
||||||
|
|
||||||
log4j.logger.org.springframework.beans=WARN
|
|
||||||
log4j.logger.org.springframework.binding=DEBUG
|
|
||||||
|
|
||||||
#log4j.logger.org.springframework.jdbc=TRACE
|
|
||||||
#log4j.logger.org.springframework.jdbc.datasource.embedded=INFO
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Configuration status="WARN">
|
||||||
|
<Appenders>
|
||||||
|
<Console name="Console" target="SYSTEM_OUT">
|
||||||
|
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" />
|
||||||
|
</Console>
|
||||||
|
<File name="File" fileName="build/logs/spring-jdbc.log">
|
||||||
|
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" />
|
||||||
|
</File>
|
||||||
|
</Appenders>
|
||||||
|
<Loggers>
|
||||||
|
<Logger name="org.springframework.jdbc" level="warn" />
|
||||||
|
<Logger name="org.springframework.jdbc.datasource.embedded" level="warn" />
|
||||||
|
<Root level="error">
|
||||||
|
<AppenderRef ref="Console" />
|
||||||
|
<AppenderRef ref="File" />
|
||||||
|
</Root>
|
||||||
|
</Loggers>
|
||||||
|
</Configuration>
|
|
@ -1,11 +0,0 @@
|
||||||
log4j.appender.console=org.apache.log4j.ConsoleAppender
|
|
||||||
log4j.appender.console.layout=org.apache.log4j.PatternLayout
|
|
||||||
log4j.appender.console.layout.ConversionPattern=%d{HH:mm:ss,SSS} [%c] - %m%n
|
|
||||||
|
|
||||||
log4j.rootCategory=WARN, console
|
|
||||||
log4j.logger.org.springframework.beans=WARN
|
|
||||||
log4j.logger.org.springframework.binding=DEBUG
|
|
||||||
|
|
||||||
|
|
||||||
#log4j.logger.org.springframework.jms=TRACE
|
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Configuration status="WARN">
|
||||||
|
<Appenders>
|
||||||
|
<Console name="Console" target="SYSTEM_OUT">
|
||||||
|
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" />
|
||||||
|
</Console>
|
||||||
|
</Appenders>
|
||||||
|
<Loggers>
|
||||||
|
<Logger name="org.springframework.jms" level="warn" />
|
||||||
|
<Root level="error">
|
||||||
|
<AppenderRef ref="Console" />
|
||||||
|
</Root>
|
||||||
|
</Loggers>
|
||||||
|
</Configuration>
|
|
@ -1,13 +0,0 @@
|
||||||
log4j.appender.console=org.apache.log4j.ConsoleAppender
|
|
||||||
log4j.appender.console.layout=org.apache.log4j.PatternLayout
|
|
||||||
log4j.appender.console.layout.ConversionPattern=%d{HH:mm:ss,SSS} [%c] - %m%n
|
|
||||||
|
|
||||||
log4j.rootCategory=WARN, console
|
|
||||||
log4j.logger.org.springframework.messaging=DEBUG
|
|
||||||
log4j.logger.org.apache.activemq=INFO
|
|
||||||
|
|
||||||
# Enable TRACE level to chase integration test issues on CI servers
|
|
||||||
log4j.logger.org.springframework.messaging.simp.stomp=TRACE
|
|
||||||
log4j.logger.reactor=DEBUG
|
|
||||||
log4j.logger.io.netty=INFO
|
|
||||||
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Configuration status="WARN">
|
||||||
|
<Appenders>
|
||||||
|
<Console name="Console" target="SYSTEM_OUT">
|
||||||
|
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" />
|
||||||
|
</Console>
|
||||||
|
</Appenders>
|
||||||
|
<Loggers>
|
||||||
|
<Logger name="org.springframework.messaging" level="warn" />
|
||||||
|
<Logger name="org.apache.activemq" level="info" />
|
||||||
|
<Logger name="reactor" level="info" />
|
||||||
|
<Logger name="io.netty" level="info" />
|
||||||
|
<!-- Enable TRACE level to chase integration test issues on CI servers -->
|
||||||
|
<!--
|
||||||
|
<Logger name="org.springframework.messaging.simp.stomp" level="trace" />
|
||||||
|
-->
|
||||||
|
<Root level="error">
|
||||||
|
<AppenderRef ref="Console" />
|
||||||
|
</Root>
|
||||||
|
</Loggers>
|
||||||
|
</Configuration>
|
|
@ -1,10 +0,0 @@
|
||||||
log4j.appender.console=org.apache.log4j.ConsoleAppender
|
|
||||||
log4j.appender.console.layout=org.apache.log4j.PatternLayout
|
|
||||||
log4j.appender.console.layout.ConversionPattern=%d{HH:mm:ss,SSS} [%c] - %m%n
|
|
||||||
|
|
||||||
log4j.rootCategory=INFO, console
|
|
||||||
log4j.logger.org.springframework.beans=WARN
|
|
||||||
log4j.logger.org.springframework.binding=DEBUG
|
|
||||||
|
|
||||||
#log4j.logger.org.springframework.orm=TRACE
|
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Configuration status="WARN">
|
||||||
|
<Appenders>
|
||||||
|
<Console name="Console" target="SYSTEM_OUT">
|
||||||
|
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" />
|
||||||
|
</Console>
|
||||||
|
</Appenders>
|
||||||
|
<Loggers>
|
||||||
|
<Logger name="org.springframework.orm" level="warn" />
|
||||||
|
<Root level="error">
|
||||||
|
<AppenderRef ref="Console" />
|
||||||
|
</Root>
|
||||||
|
</Loggers>
|
||||||
|
</Configuration>
|
|
@ -1,8 +0,0 @@
|
||||||
log4j.appender.console=org.apache.log4j.ConsoleAppender
|
|
||||||
log4j.appender.console.layout=org.apache.log4j.PatternLayout
|
|
||||||
log4j.appender.console.layout.ConversionPattern=%d{HH:mm:ss,SSS} [%c] - %m%n
|
|
||||||
|
|
||||||
log4j.rootCategory=INFO, console
|
|
||||||
|
|
||||||
#log4j.logger.org.springframework.oxm=TRACE
|
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Configuration status="WARN">
|
||||||
|
<Appenders>
|
||||||
|
<Console name="Console" target="SYSTEM_OUT">
|
||||||
|
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" />
|
||||||
|
</Console>
|
||||||
|
</Appenders>
|
||||||
|
<Loggers>
|
||||||
|
<Logger name="org.springframework.oxm" level="warn" />
|
||||||
|
<Root level="error">
|
||||||
|
<AppenderRef ref="Console" />
|
||||||
|
</Root>
|
||||||
|
</Loggers>
|
||||||
|
</Configuration>
|
|
@ -1,34 +0,0 @@
|
||||||
log4j.appender.console=org.apache.log4j.ConsoleAppender
|
|
||||||
log4j.appender.console.layout=org.apache.log4j.PatternLayout
|
|
||||||
log4j.appender.console.layout.ConversionPattern=%d{HH:mm:ss,SSS} [%-5p] [%c] - %m%n
|
|
||||||
|
|
||||||
log4j.appender.file=org.apache.log4j.FileAppender
|
|
||||||
log4j.appender.file.file=bin/spring-test.log
|
|
||||||
log4j.appender.file.layout=org.apache.log4j.PatternLayout
|
|
||||||
log4j.appender.file.layout.ConversionPattern=%d{HH:mm:ss,SSS} [%c] - %m%n
|
|
||||||
|
|
||||||
log4j.rootCategory=ERROR, console, file
|
|
||||||
|
|
||||||
log4j.logger.org.springframework.beans=WARN
|
|
||||||
|
|
||||||
log4j.logger.org.springframework.test.context=WARN
|
|
||||||
log4j.logger.org.springframework.test.context.TestContext=WARN
|
|
||||||
log4j.logger.org.springframework.test.context.TestContextManager=WARN
|
|
||||||
log4j.logger.org.springframework.test.context.ContextLoaderUtils=WARN
|
|
||||||
log4j.logger.org.springframework.test.context.cache=WARN
|
|
||||||
log4j.logger.org.springframework.test.context.junit4.rules=WARN
|
|
||||||
log4j.logger.org.springframework.test.context.transaction.TransactionalTestExecutionListener=WARN
|
|
||||||
log4j.logger.org.springframework.test.context.web=WARN
|
|
||||||
|
|
||||||
#log4j.logger.org.springframework.test.context.support=INFO
|
|
||||||
#log4j.logger.org.springframework.test.context.support.DelegatingSmartContextLoader=INFO
|
|
||||||
#log4j.logger.org.springframework.test.context.support.AbstractGenericContextLoader=INFO
|
|
||||||
#log4j.logger.org.springframework.test.context.support.AnnotationConfigContextLoader=INFO
|
|
||||||
|
|
||||||
# The following must be kept at DEBUG in order to test SPR-14363.
|
|
||||||
log4j.logger.org.springframework.test.util=DEBUG
|
|
||||||
|
|
||||||
log4j.logger.org.springframework.test.web.servlet.result=DEBUG
|
|
||||||
|
|
||||||
#log4j.logger.org.springframework.test=TRACE
|
|
||||||
|
|
|
@ -0,0 +1,35 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Configuration status="WARN">
|
||||||
|
<Appenders>
|
||||||
|
<Console name="Console" target="SYSTEM_OUT">
|
||||||
|
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" />
|
||||||
|
</Console>
|
||||||
|
<File name="File" fileName="build/logs/spring-test.log">
|
||||||
|
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" />
|
||||||
|
</File>
|
||||||
|
</Appenders>
|
||||||
|
<Loggers>
|
||||||
|
<Logger name="org.springframework.test.context" level="warn" />
|
||||||
|
<Logger name="org.springframework.test.context.TestContext" level="warn" />
|
||||||
|
<Logger name="org.springframework.test.context.TestContextManager" level="warn" />
|
||||||
|
<Logger name="org.springframework.test.context.ContextLoaderUtils" level="warn" />
|
||||||
|
<Logger name="org.springframework.test.context.cache" level="warn" />
|
||||||
|
<Logger name="org.springframework.test.context.junit4.rules" level="warn" />
|
||||||
|
<Logger name="org.springframework.test.context.transaction.TransactionalTestExecutionListener" level="warn" />
|
||||||
|
<Logger name="org.springframework.test.context.web" level="warn" />
|
||||||
|
<!-- The following must be kept at DEBUG in order to test SPR-14363. -->
|
||||||
|
<Logger name="org.springframework.test.util" level="debug" />
|
||||||
|
<!--
|
||||||
|
<Logger name="org.springframework.test.context.support" level="info" />
|
||||||
|
<Logger name="org.springframework.test.context.support.DelegatingSmartContextLoader" level="info" />
|
||||||
|
<Logger name="org.springframework.test.context.support.AbstractGenericContextLoader" level="info" />
|
||||||
|
<Logger name="org.springframework.test.context.support.AnnotationConfigContextLoader" level="info" />
|
||||||
|
<Logger name="org.springframework.beans" level="warn" />
|
||||||
|
<Logger name="org.springframework.test.web.servlet.result" level="debug" />
|
||||||
|
-->
|
||||||
|
<Root level="error">
|
||||||
|
<AppenderRef ref="Console" />
|
||||||
|
<AppenderRef ref="File" />
|
||||||
|
</Root>
|
||||||
|
</Loggers>
|
||||||
|
</Configuration>
|
|
@ -1,10 +0,0 @@
|
||||||
log4j.appender.console=org.apache.log4j.ConsoleAppender
|
|
||||||
log4j.appender.console.layout=org.apache.log4j.PatternLayout
|
|
||||||
log4j.appender.console.layout.ConversionPattern=%d{HH:mm:ss,SSS} [%c] - %m%n
|
|
||||||
|
|
||||||
log4j.rootCategory=WARN, console
|
|
||||||
log4j.logger.org.springframework.beans=WARN
|
|
||||||
log4j.logger.org.springframework.transaction=INFO
|
|
||||||
|
|
||||||
#log4j.logger.org.springframework.transaction=TRACE
|
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Configuration status="WARN">
|
||||||
|
<Appenders>
|
||||||
|
<Console name="Console" target="SYSTEM_OUT">
|
||||||
|
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" />
|
||||||
|
</Console>
|
||||||
|
</Appenders>
|
||||||
|
<Loggers>
|
||||||
|
<Logger name="org.springframework.beans" level="warn" />
|
||||||
|
<Logger name="org.springframework.transaction" level="info" />
|
||||||
|
<Root level="error">
|
||||||
|
<AppenderRef ref="Console" />
|
||||||
|
</Root>
|
||||||
|
</Loggers>
|
||||||
|
</Configuration>
|
|
@ -1,12 +0,0 @@
|
||||||
log4j.appender.console=org.apache.log4j.ConsoleAppender
|
|
||||||
log4j.appender.console.layout=org.apache.log4j.PatternLayout
|
|
||||||
log4j.appender.console.layout.ConversionPattern=%d{HH:mm:ss,SSS} [%c] - %m%n
|
|
||||||
|
|
||||||
log4j.rootCategory=WARN, console
|
|
||||||
log4j.logger.org.springframework.beans=WARN
|
|
||||||
log4j.logger.org.springframework.binding=DEBUG
|
|
||||||
|
|
||||||
#log4j.logger.org.springframework.http=TRACE
|
|
||||||
#log4j.logger.org.springframework.remoting=TRACE
|
|
||||||
#log4j.logger.org.springframework.web=TRACE
|
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Configuration status="WARN">
|
||||||
|
<Appenders>
|
||||||
|
<Console name="Console" target="SYSTEM_OUT">
|
||||||
|
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" />
|
||||||
|
</Console>
|
||||||
|
</Appenders>
|
||||||
|
<Loggers>
|
||||||
|
<Logger name="org.springframework.web" level="warn" />
|
||||||
|
<Logger name="org.springframework.beans" level="warn" />
|
||||||
|
<Logger name="org.springframework.binding" level="warn" />
|
||||||
|
<Logger name="org.springframework.http" level="warn" />
|
||||||
|
<Logger name="org.springframework.remoting" level="warn" />
|
||||||
|
<Root level="error">
|
||||||
|
<AppenderRef ref="Console" />
|
||||||
|
</Root>
|
||||||
|
</Loggers>
|
||||||
|
</Configuration>
|
|
@ -1,10 +0,0 @@
|
||||||
log4j.appender.console=org.apache.log4j.ConsoleAppender
|
|
||||||
log4j.appender.console.layout=org.apache.log4j.PatternLayout
|
|
||||||
log4j.appender.console.layout.ConversionPattern=%d{HH:mm:ss,SSS} [%c] - %m%n
|
|
||||||
|
|
||||||
log4j.rootCategory=WARN, console
|
|
||||||
log4j.logger.org.springframework.beans=WARN
|
|
||||||
log4j.logger.org.springframework.convert=DEBUG
|
|
||||||
|
|
||||||
#log4j.logger.org.springframework.web.servlet=TRACE
|
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Configuration status="WARN">
|
||||||
|
<Appenders>
|
||||||
|
<Console name="Console" target="SYSTEM_OUT">
|
||||||
|
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" />
|
||||||
|
</Console>
|
||||||
|
</Appenders>
|
||||||
|
<Loggers>
|
||||||
|
<Logger name="org.springframework.web.servlet" level="warn" />
|
||||||
|
<Logger name="org.springframework.convert" level="warn" />
|
||||||
|
<Root level="error">
|
||||||
|
<AppenderRef ref="Console" />
|
||||||
|
</Root>
|
||||||
|
</Loggers>
|
||||||
|
</Configuration>
|
|
@ -1,14 +0,0 @@
|
||||||
log4j.appender.console=org.apache.log4j.ConsoleAppender
|
|
||||||
log4j.appender.console.layout=org.apache.log4j.PatternLayout
|
|
||||||
log4j.appender.console.layout.ConversionPattern=%d{HH:mm:ss,SSS} [%-5p] [%c] - %m%n
|
|
||||||
|
|
||||||
log4j.appender.file=org.apache.log4j.FileAppender
|
|
||||||
log4j.appender.file.file=bin/spring-websocket.log
|
|
||||||
log4j.appender.file.layout=org.apache.log4j.PatternLayout
|
|
||||||
log4j.appender.file.layout.ConversionPattern=%d{HH:mm:ss,SSS} [%c] - %m%n
|
|
||||||
|
|
||||||
log4j.rootCategory=WARN, console, file
|
|
||||||
|
|
||||||
log4j.logger.org.springframework.web=WARN
|
|
||||||
log4j.logger.org.springframework.web.socket=WARN
|
|
||||||
log4j.logger.org.springframework.messaging=WARN
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Configuration status="WARN">
|
||||||
|
<Appenders>
|
||||||
|
<Console name="Console" target="SYSTEM_OUT">
|
||||||
|
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" />
|
||||||
|
</Console>
|
||||||
|
<File name="File" fileName="build/logs/spring-websocket.log">
|
||||||
|
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" />
|
||||||
|
</File>
|
||||||
|
</Appenders>
|
||||||
|
<Loggers>
|
||||||
|
<Logger name="org.springframework.web" level="warn" />
|
||||||
|
<Logger name="org.springframework.web.socket" level="warn" />
|
||||||
|
<Logger name="org.springframework.messaging" level="warn" />
|
||||||
|
<Root level="error">
|
||||||
|
<AppenderRef ref="Console" />
|
||||||
|
<AppenderRef ref="File" />
|
||||||
|
</Root>
|
||||||
|
</Loggers>
|
||||||
|
</Configuration>
|
Loading…
Reference in New Issue