2009/03/28

log4j configuration or a tale of setting conversion pattern parameters

I was given the task of configuring log4j for a Java project. I assumed it would be a 15 minute task but it turned out to be way more complicated than I initially thought. The reason you might ask: poor documentation. Basically I needed the output to be in a certain format which meant setting the conversion pattern parameters to match the format.

The problem was that I couldn't find out what the parameters meant. After lots of googling I resulted to trial and error to set up the parameters. Funnily enough the top hits when googling where people in my position trying to figure out what the parameters meant.

But I refused to give up and finally today I found it:

I tried finding tutorials and the like and I am sure that many people like me have scoured documents such as "Short introduction to log4j" to no avail.

No comments: