code: public
    void doConfigure(final InputStream inputStream, LoggerRepository repository) 
                                            throws FactoryConfigurationError {
        ParseAction action = new ParseAction() {
            public Document parse(final DocumentBuilder parser) throws SAXException, IOException {
                InputSource inputSource = new InputSource(inputStream);
                inputSource.setSystemId("dummy://log4j.dtd");
                return parser.parse(inputSource);
            }
            public String toString() { 
                return "input stream [" + inputStream.toString() + "]"; 
            }
        };
        doConfigure(action, repository);
    }
docs: Configure log4j by reading in a log4j.dtd compliant XML
  configuration file.