[jboss-user] [JBoss Seam] - Re: Issues moving from Seam 1.1.0 to Seam 1.1.5

SmokingAPipe do-not-reply at jboss.com
Wed Feb 7 15:31:52 EST 2007


Call me old fashioned but I'm in the camp that says that the logging system should be brain-dead-simple and should never cause errors and should always work.  It exists to debug and diagnose other problems.  I shouldn't have to debug and diagnose it.

Now, what's happening here is we need TWO different views of logging: One is "software diagnostic" logging, so I can trace when certain pieces of code trigger and send myself messages.  The other level is "application monitoring" logging, where the application itself generates messages that are relevant to application users.

Let's take an MTA as an example.  A "software diagnostic" level might be something like, "fatal error: attempting to free() a null pointer".  That tells me, I've made a software mistake, in the logic.  A "application monitoring" message would be, "mail delivered successfully to..." or perhaps, "unable to bind to port 25; check to see if some other process is binding to that port."  Do you see the difference?

What has happened unfortunately is that the Java community has not understood the difference.  We have these sophisticated logging frameworks that do a lot of things, but as we can see in this thread, they aren't bulletproof and they can and do cause their own problems.  This makes them bad for the software level logging I'm talking about.  Software level logging should focus on working 100% of the time.  That's why I always use java.util.logging for this, because it has no external jar dependencies, meaning that no matter what is going on with jars and classloaders, it will still always work.  That's how a software logging tool should be.

For the application-level logging, external dependencies are fine.  In my current Seam application, I actually have a logging MDB that various components use to send messages that users can then view through the web page.  That's cool but it's high level and fragile; it stops working if I make a config mistake, or have the wrong jar, or messages aren't working for whatever reason.


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4012642#4012642

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4012642



More information about the jboss-user mailing list