return logType;
}
public void saveToFile(LogType logType) throws IOException {
PropertySet configuration = new PropertySet();
configuration.setProperty(REFRESH_INTERVAL,
logType.getRefreshInterval());
List<Rule> rules = logType.getRules();
for (int i = 0; i < rules.size(); i++) {
Rule rule = (Rule) rules.get(i);
configuration.setProperty("rule." + i + ".pattern",
rule.getPattern());
configuration.setProperty("rule." + i + ".regular_expression",
rule.isRegularExpression());
configuration.setProperty("rule." + i + ".ignore_case",
rule.isIgnoreCase());
configuration.setColor("rule." + i + ".background_color",
rule.getBackgroundColor());
configuration.setColor("rule." + i + ".foreground_color",
rule.getForegroundColor());
}
String path = getPath(logType.getName());
configuration.save(path);
}