Revised log levels: less WARN and INFO, fine-tuned DEBUG vs TRACE

Issue: SPR-16946
This commit is contained in:
Juergen Hoeller
2018-07-20 15:05:13 +02:00
parent a410d90439
commit 9a43d2ec20
99 changed files with 461 additions and 486 deletions

View File

@@ -515,8 +515,8 @@ public class Jaxb2Marshaller implements MimeMarshaller, MimeUnmarshaller, Generi
}
private JAXBContext createJaxbContextFromContextPath(String contextPath) throws JAXBException {
if (logger.isInfoEnabled()) {
logger.info("Creating JAXBContext with context path [" + this.contextPath + "]");
if (logger.isDebugEnabled()) {
logger.debug("Creating JAXBContext with context path [" + this.contextPath + "]");
}
if (this.jaxbContextProperties != null) {
if (this.beanClassLoader != null) {
@@ -539,8 +539,8 @@ public class Jaxb2Marshaller implements MimeMarshaller, MimeUnmarshaller, Generi
}
private JAXBContext createJaxbContextFromClasses(Class<?>... classesToBeBound) throws JAXBException {
if (logger.isInfoEnabled()) {
logger.info("Creating JAXBContext with classes to be bound [" +
if (logger.isDebugEnabled()) {
logger.debug("Creating JAXBContext with classes to be bound [" +
StringUtils.arrayToCommaDelimitedString(classesToBeBound) + "]");
}
if (this.jaxbContextProperties != null) {
@@ -552,8 +552,8 @@ public class Jaxb2Marshaller implements MimeMarshaller, MimeUnmarshaller, Generi
}
private JAXBContext createJaxbContextFromPackages(String... packagesToScan) throws JAXBException {
if (logger.isInfoEnabled()) {
logger.info("Creating JAXBContext by scanning packages [" +
if (logger.isDebugEnabled()) {
logger.debug("Creating JAXBContext by scanning packages [" +
StringUtils.arrayToCommaDelimitedString(packagesToScan) + "]");
}
ClassPathJaxb2TypeScanner scanner = new ClassPathJaxb2TypeScanner(this.beanClassLoader, packagesToScan);
@@ -869,7 +869,7 @@ public class Jaxb2Marshaller implements MimeMarshaller, MimeUnmarshaller, Generi
return new SAXSource(xmlReader, inputSource);
}
catch (SAXException ex) {
logger.warn("Processing of external entities could not be disabled", ex);
logger.info("Processing of external entities could not be disabled", ex);
return source;
}
}

View File

@@ -217,14 +217,15 @@ public class JibxMarshaller extends AbstractMarshaller implements InitializingBe
public void afterPropertiesSet() throws JiBXException {
if (this.targetClass != null) {
if (StringUtils.hasLength(this.bindingName)) {
if (logger.isInfoEnabled()) {
logger.info("Configured for target class [" + this.targetClass + "] using binding [" + this.bindingName + "]");
if (logger.isDebugEnabled()) {
logger.debug("Configured for target class [" + this.targetClass +
"] using binding [" + this.bindingName + "]");
}
this.bindingFactory = BindingDirectory.getFactory(this.bindingName, this.targetClass);
}
else {
if (logger.isInfoEnabled()) {
logger.info("Configured for target class [" + this.targetClass + "]");
if (logger.isDebugEnabled()) {
logger.debug("Configured for target class [" + this.targetClass + "]");
}
this.bindingFactory = BindingDirectory.getFactory(this.targetClass);
}
@@ -233,8 +234,9 @@ public class JibxMarshaller extends AbstractMarshaller implements InitializingBe
if (!StringUtils.hasLength(this.bindingName)) {
this.bindingName = DEFAULT_BINDING_NAME;
}
if (logger.isInfoEnabled()) {
logger.info("Configured for target package [" + this.targetPackage + "] using binding [" + this.bindingName + "]");
if (logger.isDebugEnabled()) {
logger.debug("Configured for target package [" + this.targetPackage +
"] using binding [" + this.bindingName + "]");
}
this.bindingFactory = BindingDirectory.getFactory(this.bindingName, this.targetPackage);
}