Hi, I would like to do Ant2 logging with logkit. Logkit is a lightweigh logging toolkit developed a couple of years ago as an easy to use performance logging. It is part of the Avalon project.
I am willing to bet the first question asked is why we use this instead of either the Logging JSR or Log4j. The Logging JSR has recently been changed to JDK1.4+ only so that is not really an option. Log4j is a lto larger a product. It has significantly more features - object rendering, ability to build custom priorities, stack introspectiong, internationalisation and a few more that I have probably missed. However along with this comes extra complexity, bulk and size. Ant does not need any of these features; * object rendering is not useful as tasks won't be directly interfacing with that section (breaks IOC Container-component contract) * we don't need custom priorities * we don't need stack introspection because logging will already be redirected on per task basis (again via IOC). Log4j vs Logkit in size: 180 kb vs 20 kb Logkit also has a minimal client interface; only variation on three methods to learn for task writers - namely debug( String message ); - log debug message debug( String message, Exception e ); - log debug message and an exception isDebugEnabled() - check if debug is enabled for logger - useful to avoid expensive loggin operations Repeat and replace debug for the other priority levels (info, warn, error, fatalError). If we adopt the Avalon Framework then logkit is already integrated into lifecycle. There is also useful base class to inherit from. The only problem is again lack of documentation - however along with the Avalon framework this will be addressed post the 11 th ;) Votes? Cheers, Pete *-----------------------------------------------------* | "Faced with the choice between changing one's mind, | | and proving that there is no need to do so - almost | | everyone gets busy on the proof." | | - John Kenneth Galbraith | *-----------------------------------------------------*
