public void saveTo(File file) {
try {
if (!file.exists()) {
file.createNewFile();
}
FileLogger logger = new FileLogger(file);
for (int i = 0; i < viewModel.getRowCount(); i++) {
logger.logMessage((LogMessage) viewModel.getRow(i));
}
logger.close();
LogMessage msg = new LogMessage(LogMessage.WORTHLESS_CHATTER, null,
"Saved logfile: " + file, "");
LogManager.getInstance().logMessage(msg);
} catch (Exception ex) {
LogMessage msg = new LogMessage(LogMessage.ERROR, ex,