commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Torsten Curdt <tcu...@apache.org>
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  
libraries

  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

cheers
--
Torsten

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message