Software Development

How to configure Log4j to log to console

Okay, you wrote a lot of Log4j debug statements all over your codebase but do not want them to appear in QA and/or Production environment. How to do that? You need to configure Log4j by modifying log4j.xml. You could also use log4j.properties in place of log4j.xml but some advanced settings can only be set using the latter. Might as well use something that offers greater benefits.

Software Development

How to Log to Separate Files in Log4j2

You have a batch application that reads, parses interface files (i.e., data files from other sources usually legacy systems), and inserts data into your batch application’s database. All logs are written to a single file. Now, the business starts a

Java, Software Development

Java, XSLT, and XML with Namespaces

When a XML uses namespaces, they need to be declared and used in the .xsl file so that the javax.xml.transform.Transformer knows how to deal with various elements in the XML. This post demonstrates how to deal with namespaces when performing transformation from or on XMLs.