Main menu:

Site search

Categories

Archive

Logging: Why so hard to find the right answer?

I’m finishing up the details of the particular web framework I want to use for this project. One thing I tackled yesterday was logging. Pretty straightforward, right?

Having been away from java web frameworks for many years, I finally got a chance to play with them last year at work. So I was aware of some of what it’s supposed to look like. Yesterday I set aside a couple hours to configure my logging and sprinkle a few log statements in my code just to see how it worked.

Simple goal. But how exactly to go about it? I wasn’t able to find a succinct logging tutorial on the Struts 2 site. So Google has the answer, right? But where do you start? “Struts 2 logging” didn’t work. After several failed attempts, I finally found a good page about basic logging facilities. It lists 2/22/07 as its publishing date, so I trust it’s reasonably up to date with all the latest trends. Whatever. It works.

But those couple hours of failed searches were illuminating. Along the way I uncover the debate between java 1.4 logging, log4j, and commons-logging. Perhaps this is why there were so few authoritative, succinct descriptions of java logging? Of all the things to waste time debating about…. Seriously — logging? Crickey.

I’ve been trying to figure out what this says about the problem with web application frameworks. One thing I like about the java ecosystem is that it does seem to address a wide range of concerns, and it respects varying approaches and alternate libraries. Matt Raible has a good slideshow comparing web frameworks on his blog. I don’t see this kind of complexity anywhere else.. though of course it could be argued that there is too much complexity.

I’ve seen my share of Perl approaches. I’m also aware of Rails and Django — frameworks based on other languages. But it seems to me that there are often hidden strategic costs, no matter what the decision is. How good are the ORM layers for each of these frameworks, for instance? Or do they support a variety of ORMs? What about GUI design, components, or tag libraries? Do they have deep javascript or ajax support? Flash? Dojo? How well do they integrate with build and deployment tools? How good is their logging?

As always: more soon.

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google

Comments

Comment from brian
Time: August 19, 2007, 1:08 pm

Thanks for the link

Write a comment