RE: DBCP Contribution: Replace System.out calls with Commons Logging
Craig R. McClanahan wrote: Noel J. Bergman wrote: The upcoming version 1.0.4 of commons-logging has an AvalonLogger So we create an AvalonLogger around our component's logger, and pass that to any object that uses commons-logging. I'm travelling and away from my CVS sources for [logging], but I'm pretty sure that the 1.0.4 code even auto-recognizes the availability of the Avalon logger like it does Log4J and JDK 1.4 logging. If it doesn't, I'd be happy to implement that before a [logging] 1.0.4 release. Craig, how does that work? By that, I mean, Avalon uses an IoC model, so how does the Commons Logger know which logger to use? For example, I would want DBCP to be using the logger defined for the database connection component. At present, we create an adapter between what DBCP expects (PrintWriter) and the Avalon logger, but I'd very much like to see full-fledged logging with levels. --- Noel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: DBCP Contribution: Replace System.out calls with Commons Logging
On 27 May 2004, at 14:58, Noel J. Bergman wrote: Craig R. McClanahan wrote: Noel J. Bergman wrote: The upcoming version 1.0.4 of commons-logging has an AvalonLogger So we create an AvalonLogger around our component's logger, and pass that to any object that uses commons-logging. I'm travelling and away from my CVS sources for [logging], but I'm pretty sure that the 1.0.4 code even auto-recognizes the availability of the Avalon logger like it does Log4J and JDK 1.4 logging. If it doesn't, I'd be happy to implement that before a [logging] 1.0.4 release. Craig, how does that work? By that, I mean, Avalon uses an IoC model, so how does the Commons Logger know which logger to use? For example, I would want DBCP to be using the logger defined for the database connection component. At present, we create an adapter between what DBCP expects (PrintWriter) and the Avalon logger, but I'd very much like to see full-fledged logging with levels. hi noel the current avalon logger implementation allows a default logger to be set by a static method call. the implementation then gets a child logger (by name) from that logger. i was looking at this a little while ago and thinking to myself: this isn't too clever. at the very least, it should allow default loggers to be set per context classloader (to provide isolation in a container environment). i may refactor the logger (once the 1.0.4 release is done). a while ago, leo was talking about IoC and logging. he points was that it's not really the design of the commons-logging API but the use of that API that allows it to be used (or not) in an IoC environment. the key is that it should be possible to set the log implementations used by the component. - robert - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: DBCP Contribution: Replace System.out calls with Commons Logging
Noel J. Bergman wrote: The upcoming version 1.0.4 of commons-logging has an AvalonLogger So we create an AvalonLogger around our component's logger, and pass that to any object that uses commons-logging. That saves me the trouble. Excellent. I'm travelling and away from my CVS sources for [logging], but I'm pretty sure that the 1.0.4 code even auto-recognizes the availability of the Avalon logger like it does Log4J and JDK 1.4 logging. If it doesn't, I'd be happy to implement that before a [logging] 1.0.4 release. --- Noel Craig - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DBCP Contribution: Replace System.out calls with Commons Logging
-- Reposting with a more descriptive subject -- I've been looking through the DBCP source this morning and have noticed several instances where System.out, System.err and printStackTrace() have been used to write error or status messages to the console. I'm wondering if there's any interest in a contribution that would replace these calls with calls to the commons-logging package instead? I'm making these changes to my own copy anyway - so I'm just curious if there's any interested in having them contributed back. The downside is that this would make DBCP dependent on the commons-logging library which (IMHO) is worth it I think. Steve ([EMAIL PROTECTED]) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: DBCP Contribution: Replace System.out calls with Commons Logging
I've been looking through the DBCP source this morning and have noticed several instances where System.out, System.err and printStackTrace() have been used to write error or status messages to the console. I'm wondering if there's any interest in a contribution that would replace these calls with calls to the commons-logging package instead? YES! :-) At least on my part. Honestly, if you're going to tie Commons Pool and DBCP to Logging, also introduce the idea of levels so that we get debugging, info, error, etc., appropriate messages. --- Noel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: DBCP Contribution: Replace System.out calls with Commons Logging
Noel J. Bergman wrote: I've been looking through the DBCP source this morning and have noticed several instances where System.out, System.err and printStackTrace() have been used to write error or status messages to the console. I'm wondering if there's any interest in a contribution that would replace these calls with calls to the commons-logging package instead? YES! :-) At least on my part. Honestly, if you're going to tie Commons Pool and DBCP to Logging, also introduce the idea of levels so that we get debugging, info, error, etc., appropriate messages. How would commons-logging fit within the Avalon framework? (James uses DBCP now). -- Serge Knystautas President Lokitech software . strategy . design http://www.lokitech.com p. 301.656.5501 e. [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: DBCP Contribution: Replace System.out calls with Commons Logging
How would commons-logging fit within the Avalon framework? (James uses DBCP now). I wrote an adapter once to bridge between DBCP and Avalon's logging. If I had to, I suppose I would write another, although having so many disparate logging packages is a tad on the annoying side. --- Noel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]