commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Torsten Curdt <>
Subject Re: [exec] How to support the various Logging APIs?!
Date Thu, 10 Jan 2008 15:37:35 GMT
What I ended up doing these days...

I have the most basic logging interface in the package space of my  

  interface Console {
    void println(String)

And if the application using that library wants to log what's going  
on *inside* the library I inject a Console implementation being  
whatever logger is being used. IMO makes it a very clear contract and  
also makes you think about logging an not just log everything!
I know - no log level bla bla ...but it is simple and gets the job  
done. And I would argue that a library should be so robust that (at  
least preferably) it does not need any logging at all ...or if there  
is a problem you just debug it.

IMO this also comes down to a question of API design.

My 2 cents


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message