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