1 package org.simantics.logging.ui.handlers;
3 import javax.inject.Named;
5 import org.eclipse.e4.core.di.annotations.Execute;
6 import org.simantics.logging.LogConfigurator;
7 import org.slf4j.Logger;
8 import org.slf4j.LoggerFactory;
10 public class SelectLoggingLevelHandler {
12 private static final Logger LOGGER = LoggerFactory.getLogger(SelectLoggingLevelHandler.class);
15 public void execute(@Named("org.simantics.logging.ui.commandparameter.selectLoggingLevel") String level) {
16 if (LOGGER.isDebugEnabled())
17 LOGGER.debug("Setting logging level to {}", level);
18 LogConfigurator.setLoggingLevel(level);