String curLogLevel = LogManager.getLogManager().getProperty(".level");
// create log config menu with available log levels
Iterator<Level> levelIt = MainFrame.logLevels.iterator();
while (levelIt.hasNext()) {
Level level = levelIt.next();
JRadioButtonMenuItem item = new JRadioButtonMenuItem(level.toString());
// select current log level
if (level.toString().equals(curLogLevel)) {
item.setSelected(true);
}
item.addActionListener(new SetLogConfigHandler());
levelGroup.add(item);
logConfig.add(item);