本文整理了Java中org.objectweb.util.monolog.api.Logger.getCurrentLevel()
方法的一些代码示例,展示了Logger.getCurrentLevel()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Logger.getCurrentLevel()
方法的具体详情如下:
包路径:org.objectweb.util.monolog.api.Logger
类名称:Logger
方法名:getCurrentLevel
[英]Returns the current level value under the Level format
[中]返回级别格式下的当前级别值
代码示例来源:origin: org.ow2.jonas/jonas-commons
/**
* Set the given log level to the specified logger.
* @param loggerName name of the loger to be configured
* @param level target level
* @return the previous level of the logger
*/
public static Level setComponentLogLevel(final String loggerName,
final Level level) {
Logger log = Log.getLogger(loggerName);
Level old = log.getCurrentLevel();
log.setLevel(level);
return old;
}
代码示例来源:origin: org.objectweb.jonas/jonas-log
/**
* Return a topic's level
* @param topic the topic we need ti know its level
* @return the topic's level
*/
public String getTopicLevel(final String topic) {
Logger topicLogger = Log.getLoggerFactory().getLogger(topic);
Level lev = topicLogger.getCurrentLevel();
return lev.getName();
}
代码示例来源:origin: org.ow2.jonas/jonas-mbeans
/**
* Return a topic's level
* @param topic the topic we need ti know its level
* @return the topic's level
*/
public String getTopicLevel(final String topic) {
Logger topicLogger = Log.getLoggerFactory().getLogger(topic);
Level lev = topicLogger.getCurrentLevel();
return lev.getName();
}
代码示例来源:origin: org.ow2.jonas/jonas-mbeans
/**
* Return a topic's level.
* @param topic the topic we need to know its level
* @return the topic's level
*/
public String getTopicLevel(final String topic) {
Logger topicLogger = Log.getLoggerFactory().getLogger(topic);
Level lev = topicLogger.getCurrentLevel();
return lev.getName();
}
代码示例来源:origin: org.ow2.petals.dsb/dsb-kernel
@WebMethod
public List<org.petalslink.dsb.ws.api.logger.Logger> getAll() {
log.info("Get all loggers");
List<org.petalslink.dsb.ws.api.logger.Logger> result = new ArrayList<org.petalslink.dsb.ws.api.logger.Logger>();
Logger[] loggers = org.objectweb.util.monolog.Monolog.getMonologFactory().getLoggers();
for (Logger logger : loggers) {
org.petalslink.dsb.ws.api.logger.Logger l = new org.petalslink.dsb.ws.api.logger.Logger();
l.setName(logger.getName());
l.setLevel(logger.getCurrentLevel().getName());
result.add(l);
}
return result;
}
内容来源于网络,如有侵权,请联系作者删除!