logFilePrefix = logFilePrefix.replace('.', '_');
String logFileSuffix = "." + ProbeMakerConstants.logFileSuffix; //$NON-NLS-1$
File logFile = null;
int suffixnumber = 0;
if (logPath == null) {
log = new HTMLLogWriter(null);
}
else {
HTMLLogWriter defaultLog = new HTMLLogWriter(new PrintWriter(System.out));
log = defaultLog;
do {
suffixnumber++;
logFile = new File(logPath, logFilePrefix + "_" + suffixnumber + logFileSuffix); //$NON-NLS-1$
}
while (logFile.exists());
try {
log = new HTMLLogWriter(new PrintWriter(new FileOutputStream(logFile)));
}
catch (FileNotFoundException fnfx) {
fnfx.printStackTrace();
log = defaultLog;
}