DOMConfigurator.java 文件源码

java
阅读 21 收藏 0 点赞 0 评论 0

项目:daq-eclipse 作者:
/**
   Configure log4j by reading in a log4j.dtd compliant XML
   configuration file.

*/
public
void doConfigure(final Reader reader, LoggerRepository repository) 
                                        throws FactoryConfigurationError {
    ParseAction action = new ParseAction() {
        public Document parse(final DocumentBuilder parser) throws SAXException, IOException {
            InputSource inputSource = new InputSource(reader);
            inputSource.setSystemId("dummy://log4j.dtd");
            return parser.parse(inputSource);
        }
        public String toString() { 
            return "reader [" + reader.toString() + "]"; 
        }
    };
  doConfigure(action, repository);
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号