I was able to solve the problem. The tutorial constructs the formatter as such,
fh.setFormatter(new Formatter() {
public String format(LogRecord rec) {
StringBuffer buf = new StringBuffer(1000);
buf.append(new java.util.Date());
buf.append(' ');
buf.append(rec.getLevel());
buf.append(' ');
buf.append(formatMessage(rec));
buf.append('\n');
return buf.toString();
}
});
The problem is that this does not actually append a new line in the file, instead of using
buf.append('\n');
you need to use
buf.append(System.getProperty("line.separator"));
My file now is readable, not a mess of connected lines. Hope this helps someone in the future.