Tuesday, January 26, 2010

Migrating Log4J properties to XML format

A few weeks on from my JBoss logging experience and I've worked out one thing so far. JBoss certainly seems to prefer the XML format over the old properties file format. So, I started to think about migrating the dozens of properties files we have to an XML format to reduce some of the pain.

I was not interested in doing that manually, and I was surprised to find that there was no tool to convert from the log4j.properties format to XML. At least, not one that I could Google.

So, in the spirit of open source, I bashed out a tool that does just that. Feed it a log4j.properties and it will spit out an equivalent XML file. It's a bit rough but seems to work for the cases I threw at it, so help yourself and let me know if it works for you. You need a JRE version 1.5 or better to run it, but I figure anyone using Log4J must surely have Java installed!

The project page, downloads and source are all over here: http://code.google.com/p/log4j-properties-converter/

Enjoy!

No comments:

Post a Comment