Fix log4j logging when redirecting output to a file (LOGSTASH-1274)