RE: [Htmlparser-developer] ParserFeedback mechanism
Brought to you by:
derrickoswald
From: <dha...@or...> - 2003-05-05 07:02:40
|
Hi Derrick, > There didn't appear to be anything in the licence > (http://jakarta.apache.org/commons/license.html) that precludes > repackaging the code into the htmlparser tree. It isn't very large. We > would have to say Derrick, is there any real need to repackage the logging code with our code. Primarily this would mean that we really won't be able to take advantage of any new enhancements/bug-fixes there are in the Logging Wrapper in the Apache tree. Why not just use their latest binary? > There is however, the task of re-working every file in the source tree > to use the logging wrapper mechanism, which is non-trivial (190 files, > 83 of which are tests). Its not that all our files use the Feedback and hence I really don't think all files should require change. I've explained below. > Of course for backwards compatibility, we should just deprecate the > ParserFeedback (et al) and provide an implementation for it in terms of > the new logging code. How about making ParserFeedback extend Log interface of Logging Wrapper. Then DefaultHTMLParserFeedback should declare feedback as follows : private static ParserFeedback feedback; Obviously all mode related code would have to be deprecated/deleted. We could have a single argument constructor as follows public DefaultParserFeedback (Class clazz) { feedback = LogFactory.getInstance(clazz) } and a no-arg constructor as public DefaultParserFeedback () { feedback = LogFactory.getInstance(this.class) } Classes using the same will create feedbacks as : new DefaultParserFeedback(this.class); Hope I've not taken things too simply and have given a comprehensive idea of how the Logging Wrapper should be incorporated with the Parser. Regards, Dhaval |