String fixedName = correctFilename(logName);
if (useHostNameInFileName) { try { String hostname = java.net.InetAddress.getLocalHost().getCanonicalHostName(); fullLogFileName.append(correctFilename(hostname)); if ((fileNamePrefix!=null)||useLogNameInFileName) { fullLogFileName.append("_"); } } catch (UnknownHostException ex) { if (isErrorEnabled()) error("",ex); } }
    public File createFile(String fileExtension) throws Exception {        // check the path ends correctly        if (!path.endsWith(File.separator)) {            path += File.separator;        }        fullLogFileName.append(path);        String fixedName = correctFilename(logName);        fullLogFileName.append(fixedName);        if (datedName){            /** Used to format times in filename */            DateFormat dateFileNameFormatter = null;            dateFileNameFormatter = new SimpleDateFormat("_yyyyMMdd-HHmmss_SSSzzz");            // add the extension            fullLogFileName.append(dateFileNameFormatter.format(new Date()));        }        // add the extension        //System.out.println("**********LogToFileImpl::createFile : "+fullLogFileName.toString()+"."+fileExtension);        return new File( fullLogFileName.toString()+"."+fileExtension);    }