You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Adam Jack <aj...@TrySybase.com> on 2003/06/03 20:17:08 UTC

[Logging] What I find unfriendly about commons-logging...

Commons-Logging important to protect open source projects from the turmoil
of JDK1.4 logging verse (the superior) log4j. That said, C-L is a
pain-in-the-rear. Just in case this isn't common knowledge (no pun intended)
I will one last time post my views & let this drop.

I consider myself "log affected", I love logs. I debug via logs. I wrote log
messages before I wrote unit tests. Logs matter. When C-L came along I was
happy to see it (although sad for log4j) and embraced it early. C-L is
developer friend, but way too user unfriendly! I've wasted too many hours
fighting it trying to turn it on!

C-L has (IMHO) "double properties" & logging-unfriendly-defaults & poor
logging/error reporting for debugging logging property settings, and that
really hurts usability. I can get JDK1.4 logging to work, but never inside
C-L when inside an app server or whatever, it is just too painful. These
days I check out commons-logging from CVS, hack it to turn on debug, and use
that.

Log4j had the smarts to have log4j.debug allow "debugging properties", and
C-L needs that. Something seems really wrong with how C-L properties are
handled. Make a few mistakes in the configuration & you'll see nothing but
unhelpful messages.  IMHO C-L needs unit tests specifically for bad
configurations, and it needs to improve it's error reporting. Users ought
not be wasting time debugging the debugging aid.

Further, the defaults seem terrible. If I run in JDK 1.4 (and have logging
configured) and C-L picks up the JDK1.4 driver, then I ought not need a C-L
properties file to see log messages. IMHO whatever the underlying
configuration has set-up, ought be accepted. For whatever reason I can get
JDK1.4 working, but never get it working inside C-L. That seems pretty
bogus.

Just my tuppence, and no -- I don't have a patch to fix it all, sorry.

regards,

Adam
--
<http://www.try.sybase.com>
Experience Sybase Technology ...


Re: [Logging] What I find unfriendly about commons-logging...

Posted by Adam Jack <aj...@trysybase.com>.
> In the very early days of C-L, you probably did need to do this ... it
> took until 1.0.3 to get all the multi-class-loader kinks out.  Please try
> it with the current version of C-L.

Yeah, I recall those classloader woes (my app server, Sybase EAS, validly
returns null for a classloader & I had to hack my own C-L too many times.)

Ok, I'll get this tested & see where it takes me.

That said, if a user has a C-L properties file perhaps allow them to debug
it.

regards

Adam


RE: [Logging] What I find unfriendly about commons-logging...

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Tue, 3 Jun 2003, Adam Jack wrote:

> Date: Tue, 3 Jun 2003 15:00:55 -0600
> From: Adam Jack <aj...@TrySybase.com>
> Reply-To: Jakarta Commons Users List <co...@jakarta.apache.org>,
>      ajack@TrySybase.com
> To: 'Jakarta Commons Users List' <co...@jakarta.apache.org>
> Subject: RE: [Logging] What I find unfriendly about commons-logging...
>
>
> 	It's not at all obvious why you think you need to configure C-L in this
> 	environment.
>
> Perhaps I am just a dumb user. Perhaps when AXIS first started  using C-L I
> learned I had to (perhaps I did, perhaps I didn't, I felt I did), and never
> unlearned that. That said the comments still stand, I think C-L needs to
> invest more in helping dumb users out & start-up, especially those who want
> debug output (for C-L and C-L callers).
>

In the very early days of C-L, you probably did need to do this ... it
took until 1.0.3 to get all the multi-class-loader kinks out.  Please try
it with the current version of C-L.

> regards
>
> Adam

Craig

RE: [Logging] What I find unfriendly about commons-logging...

Posted by Adam Jack <aj...@TrySybase.com>.
	It's not at all obvious why you think you need to configure C-L in this
	environment.

Perhaps I am just a dumb user. Perhaps when AXIS first started  using C-L I
learned I had to (perhaps I did, perhaps I didn't, I felt I did), and never
unlearned that. That said the comments still stand, I think C-L needs to
invest more in helping dumb users out & start-up, especially those who want
debug output (for C-L and C-L callers).

regards

Adam


Re: [Logging] What I find unfriendly about commons-logging...

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Tue, 3 Jun 2003, Adam Jack wrote:

> Further, the defaults seem terrible. If I run in JDK 1.4 (and have logging
> configured) and C-L picks up the JDK1.4 driver, then I ought not need a C-L
> properties file to see log messages. IMHO whatever the underlying
> configuration has set-up, ought be accepted. For whatever reason I can get
> JDK1.4 working, but never get it working inside C-L. That seems pretty
> bogus.

It's not at all obvious why you think you need to configure C-L in this
environment.  I use exactly this combination all day long (JDK 1.4, C-L,
building webapps running on Tomcat, no Log4J installed) and never
configure C-L at all.  The config settings get picked up from
$JAVA_HOME/jre/lib/logging.properties just like they are supposed to.

The only gotcha when doing this under Tomcat is you have to restart Tomcat
to get changes to the 1.4 settings to take effect, because by default JDK
1.4 logging only self-configures at startup time -- but that's a JDK
issue.

>
> Just my tuppence, and no -- I don't have a patch to fix it all, sorry.
>
> regards,
>
> Adam

Craig