|
Gwyn Evans wrote: Yes, I agree completely. However, any library should not dictate that you must use any particular logging framework. This was the whole reason that commons-logging was developed, to allow people to write reusable libraries that can work with any logging strategy associated with the project that the library is used in.On Thu, 04 Nov 2004 11:22:42 +0000, Chris Turner <[EMAIL PROTECTED]> wrote: I personally like log4j and use it in my own projects. However a number of my corporate customers dictate that jdk logging must be used for all application logging on all projects. They have non-Java support staff who are familiar with jdk log output and so on. Thus my choice for these customers is limited either to libraries that support jdk logging or ones supporting commons-logging where I can configure this to use jdk logging as opposed to log4j. Libraries that force use of log4j are therefore not an option. It's not the issue of jar files, its an issue of the actual log files produced, their locations, formats and so on. At the opposite end, I have seen some customers who dicatate the exact oppisite in that all logging must be done by log4j. To satisfy both sets (plus everyone in between) commons-logging is the ONLY viable solution. If Wicket were to dicate Log4J then many of my corporate customers would not be prapared to accept it. However they are happy for libraries and products to use commons-logging because they can set these up to produce the jdk style logs that they are used to and have the tools and skills to work with. Yes, but their arguments are not against commons-logging as a concept for use in libraries that need to integrate into many different projects, and hence many different logging environments. The bulk of their arguments relate to either using commons-logging for end applications when there is really no need to do so (because a particular logging implementation will always have been selected and is unlikely to change), the fact that commons-logging hides some of the powerful features of the underlying logging platform OR to the poor way that commons-logging integrates with certain application servers. For most libraries (like Wicket) the full power of the underlying logging platform is not necessary. Additionally, if the application servers hadn't made such a mess of their own logging implementations then the commons-logging issue would not exist. The wrapping problem is indeed a problem if you apply commons-logging to your whole project. However, it is much less of a problem when applied to libraries that rarely need to access the full power of these libraries and instead rely on the logging configuration that commons-logging discovers. The commons-logging discovery methods are a problem BECAUSE of the way that app servers implement classloading and the fact that these app severs also include commons-logging within their own implementations but do not hide this from the developers of the end applications. If all application servers hid the classloaders that they use to implement their own internals and only exposed to applications a very resticted shared library class loader and the classloader for the applications then the commons-logging discovery issues would not exist. I see Wicket as being closer to a component than to a framework. In the strictest sense of the word a framework is something over which you have full architectural control within your particular team (i.e. you can select design patterns, implementation strategies, library dependencies, logging solutions and so on). Wicket (and most other open source projects) are actually component libraries that make it easier to build frameworks for a particular application. A framework for a large application includes component libraries for persistence, inversion of control, transaction, logging, UI layer, aspects and so on plus the code and patterns for how they are all linked together. Thus Wicket is just one component within an application framework - it is not itself a framework. The closest thing to a true framework is the Spring Framework as this brings together its own implementation of all the different components (plus the ability to integrate alternative components) along with the glue logic and patterns. (Incidentally, Spring Framework went through these exact same discussions and settled on commons-logging as the best comprimise solution!) I think you are spot on for cases where commons-logging is being used in an end application or in an application server: the gains are not worth the problems. However, for a reusable component library (which is what Wicket is) the problems of common-logging are actually outweighed by the gains or portability and usability of Wicket in a number of different application architectures and frameworks (where logging is log4j, jdk or some third-party or custom developed solution). Yes, the answer is commons-logging unless we want to dictate that users must use a particular logging framework. Any component library that dictates something as fundamental as this is unlikely to gain widespread adoption. To paraphrase a standard quote "You can have any colour as long as it's black" just does not cut it in the world of reusable component library development. regards, Chris Anyway, my vote's to drop the wrapping and just go with log4j... /Gwyn ------------------------------------------------------- This SF.Net email is sponsored by: Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux. http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click _______________________________________________ Wicket-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/wicket-user |
- Re: AW: AW: [Wicket-user] Wicket; Package com.voicetribe.util... Chris Turner
