final DateFormat dateFormat = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.LONG, Locale.getDefault());
try {
int index = logFileName.lastIndexOf('.');
if (index != -1) {
if (logFileName.substring(index).toLowerCase().equals(".xml")) { //$NON-NLS-1$
this.log = new GenericXMLWriter(new OutputStreamWriter(new FileOutputStream(logFileName, false), Util.UTF_8), Util.LINE_SEPARATOR, true);
this.tagBits |= Logger.XML;
// insert time stamp as comment
this.log.println("<!-- " + dateFormat.format(date) + " -->");//$NON-NLS-1$//$NON-NLS-2$
this.log.println(Logger.XML_DTD_DECLARATION);
this.parameters.put(Logger.COMPILER_NAME, this.main.bind("compiler.name")); //$NON-NLS-1$