Search in sources :

Example 1 with Level

use of org.osgl.logging.Logger.Level in project actframework by actframework.

the class LogAdmin method setLogLevel.

@Command(name = "act.log.level.update", help = "Update LOGGER level. Valid levels are:\n\t" + "5 - fatal\n\t" + "4 - error\n\t" + "3 - warn\n\t" + "2 - info\n\t" + "1 - debug\n\t" + "0 - trace")
public String setLogLevel(@Required("specify LOGGER name") String name, @Required("specify log level") int level) {
    Level lvl = convert(level);
    Logger logger = LogManager.get(name);
    logger.setLevel(lvl);
    return S.fmt("LOGGER[%s] level set to %s", name, lvl.toString());
}
Also used : Level(org.osgl.logging.Logger.Level) Logger(org.osgl.logging.Logger) Command(act.cli.Command)

Aggregations

Command (act.cli.Command)1 Logger (org.osgl.logging.Logger)1 Level (org.osgl.logging.Logger.Level)1