Re: [Htmlparser-developer] ParserFeedback mechanism
Brought to you by:
derrickoswald
From: Derrick O. <Der...@ro...> - 2003-05-02 10:59:57
|
I looked at this earlier too, regarding the org.apache.commons.logging package: http://jakarta.apache.org/commons/logging.html which provides a thin logging-system agnostic interface. 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 "This product includes software developed by the Apache Software Foundation (http://www.apache.org/)." somewhere in the documentation. 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). I would suggest this be undertaken when version 1.3 is finished. I think we can arbitrarily set a cut-off point for 1.3 next week, unless a major show-stopper is discovered. 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. Derrick dha...@or... wrote: >Hi guys, > >I remember we had a discussion about the feedback mechanism earlier. I >just wanted to restart it by suggesting use of the Logging Wrapper from >Jakarta. > >I have noticed that if anyone wants to use the ParserFeedback to log >then they will need to mostly extend the DefaultParserFeedback class and >override the methods appropriately. If we can map the ParserFeedback >class to the Logging Wrapper applications can easily use the Feedback >mechanism to log to Log4j and JDK 1.4 without having to do a thing. most >users according tome woudl be using one of these systems. I believe the >argument then was coupling with a third-party library. But I believe the >flexibility it offers outstrips the coupling drawback. > >Furthermore imagine an application which is using some other logging >tool. They have coded their entire logging framework using the Logging >Wrapper and have used an adapter to log to their logging tool. If they >use the parser and want to log its output as well, they will have to >write one more adapter. Instead if the parser provides a mechanism for >using the Logging Wrapper, they would not need to do anything. > >We ahve actually had requests wherein different clients have asked for >different logging tools to be used!!! Hence the request. > >We could simply extend from DefaultParserFeedback for LogWrapperFeedback >and make it implement the commons logging interface. > >Do let me know your thoughts/opinions/suggestions on the same. > >Regards, >Dhaval > > > > |