A new month nearly upon us, and the only thing I can think to blog is about the difficulty I had configuring the logging in piece of in-house software recently. The software was written in Java, and used the very configurable log4j library for logging. In an almost textbook use case of the library, I was tasked with converting the software from logging to stdout, to logging to a file which would be more permanent. There are, of course, several things to consider when logging to file, not least security, but another major concern was the size of the log file created. These are not new concerns however, and I decided to make use of the standard syslog facility used in conjunction with the logrotate program, both of which were available on the machine in question.
Of course, log4j supported outputting to syslog, which meant that with a simple configuration change based on any good example on the Web, I could get syslog logging instead of (or as well as) stdout logging. I could even exploit syslog’s network-transparency to log to another host, but I didn’t need that. In theory everything was now ready to go, but when I restarted the Java program, the problems started.
Continue reading "Blogging logging bugs"