There are a couple of other troubling things about the code.:
Substantial duplication between doConfigure(URL) and doConfigure(String)
Substantial duplication in o.a.l.joran.util.checkIfWellFormed(URL) and checkIfWellformed(String)
The configuration file is parsed twice, once in checkIfWellFormed and once in doConfigure. Each time reading the configuration from disk (or net or however the URL is resolved).
I assume that the two-pass approach is designed to make configuration atomic, so that any error in the configuration file results in no configuration being applied. You could copy the InputStream into a byte array and use MemoryInputStream to prevent the file from being access twice, but I think it be better to only parse once.
One approach would be to try to stack configuration actions in a list, but I think that would be pretty complicated. It appears that the Joran configurator ignores any character content (other than within attribute). It should be fairly simple to parse the document and create a list of start and end element events, then replay the events into the Joran configurator.
Eliminating the duel fetching of the configuration file would probably come close to paying for the expense of validating the configuration file against a log4j.dtd embedded as a resource. JoranConfiguration as far as I can tell wouldn't currently complain about elements containing character content.
Implicit is misspelled in "addImplcitAction", getapplicableActionList on org.apache.joran.Interpreter.
I'd be willing to take a shot if you'd like.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
