1 16 17 package org.springframework.beans.factory.parsing; 18 19 import org.apache.commons.logging.Log; 20 import org.apache.commons.logging.LogFactory; 21 22 37 public class FailFastProblemReporter implements ProblemReporter { 38 39 private Log logger = LogFactory.getLog(getClass()); 40 41 42 48 public void setLogger(Log logger) { 49 this.logger = (logger != null ? logger : LogFactory.getLog(getClass())); 50 } 51 52 53 58 public void fatal(Problem problem) { 59 throw new BeanDefinitionParsingException(problem); 60 } 61 62 67 public void error(Problem problem) { 68 throw new BeanDefinitionParsingException(problem); 69 } 70 71 75 public void warning(Problem problem) { 76 this.logger.warn(problem, problem.getRootCause()); 77 } 78 79 } 80 | Popular Tags |