org.jboss.logging.Logger.isInfoEnabled()方法的使用及代码示例

x33g5p2x  于2022-01-23 转载在 其他  
字(4.9k)|赞(0)|评价(0)|浏览(233)

本文整理了Java中org.jboss.logging.Logger.isInfoEnabled()方法的一些代码示例,展示了Logger.isInfoEnabled()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Logger.isInfoEnabled()方法的具体详情如下:
包路径:org.jboss.logging.Logger
类名称:Logger
方法名:isInfoEnabled

Logger.isInfoEnabled介绍

[英]Check to see if the INFO level is enabled for this logger.
[中]检查此记录器的信息级别是否已启用。

代码示例

代码示例来源:origin: hibernate/hibernate-orm

/**
 * Used by SettingsFactory (in conjunction with stats being enabled) to determine whether to apply this listener
 *
 * @return {@code true} if logging is enabled for this listener.
 */
public static boolean isLoggingEnabled() {
  return log.isInfoEnabled();
}

代码示例来源:origin: looly/hutool

@Override
public boolean isInfoEnabled() {
  return logger.isInfoEnabled();
}

代码示例来源:origin: looly/hutool

@Override
public boolean isInfoEnabled() {
  return logger.isInfoEnabled();
}

代码示例来源:origin: wildfly/wildfly

@Override
public boolean isInfoEnabled() {
  return log.isInfoEnabled();
}

代码示例来源:origin: wildfly/wildfly

@Override
public boolean isInfoEnabled() {
  return this.logger.isInfoEnabled();
}

代码示例来源:origin: io.netty/netty

@SuppressWarnings("deprecation")
public boolean isInfoEnabled() {
  return logger.isInfoEnabled();
}

代码示例来源:origin: org.jboss.errai.io.netty/netty-common

@Override
@SuppressWarnings("deprecation")
public boolean isInfoEnabled() {
  return logger.isInfoEnabled();
}

代码示例来源:origin: org.switchyard/switchyard-runtime

@Override
public void handleFault(Exchange exchange) {
  if (_log.isInfoEnabled()) {
    _log.info(ExchangeFormatter.format(exchange, true));
  }
}

代码示例来源:origin: org.switchyard/switchyard-common

/**
 * Logs the SwitchYard notification returned by {@link #getSwitchYardNotification()}.
 * @param logger the Logger to log to
 */
public static void logSwitchYardNotification(Logger logger) {
  if (logger.isInfoEnabled()) {
    logger.info(getSwitchYardNotification());
  }
}

代码示例来源:origin: jboss.web/jbossweb

public void expireSession( String sessionId ) {
  Session s=(Session)sessions.get(sessionId);
  if( s==null ) {
    if(log.isInfoEnabled())
      log.info("Session not found " + sessionId);
    return;
  }
  s.expire();
}

代码示例来源:origin: jboss.web/jbossweb

public String getCreationTime( String sessionId ) {
  Session s=(Session)sessions.get(sessionId);
  if( s==null ) {
    if(log.isInfoEnabled())
      log.info("Session not found " + sessionId);
    return "";
  }
  return new Date(s.getCreationTime()).toString();
}

代码示例来源:origin: org.switchyard/switchyard-runtime

@Override
public void handleMessage(Exchange exchange) throws HandlerException {
  if (_log.isInfoEnabled()) {
    _log.info(ExchangeFormatter.format(exchange, true));
  }
}

代码示例来源:origin: jboss.remoting/jboss-remoting

public SingleGroupInputThread(MultiplexingManager manager, Socket socket, OutputStream os)
throws IOException
{
  this.is = new BufferedInputStream(socket.getInputStream());
  this.manager = manager;
  currentOutputStream = os;
  trace = log.isTraceEnabled();
  debug = log.isDebugEnabled();
  info = log.isInfoEnabled();
}

代码示例来源:origin: org.mobicents.core/mobicents-core-jar

public void sbbRolledBack(RolledBackContext context) {
  if (sbbObject != null) {
    sbbObject.sbbRolledBack(context);
    sbbObject.sbbStore();
    sbbObject.sbbPassivate();
  } else {
    if (log.isInfoEnabled())
      log.info("Unexpected case. Check it!"); // CHECKME
  }
}

代码示例来源:origin: org.jboss.slf4j/slf4j-jboss-logging

@Override
public void info(final String format, final Object arg) {
  if (logger.isInfoEnabled()) {
    final FormattingTuple formattingTuple = MessageFormatter.format(format, arg);
    log(Level.INFO, LOGGER_FQCN, formattingTuple.getMessage(), formattingTuple.getThrowable());
  }
}

代码示例来源:origin: org.jboss.slf4j/slf4j-jboss-logging

@Override
public void info(final String format, final Object arg1, final Object arg2) {
  if (logger.isInfoEnabled()) {
    final FormattingTuple formattingTuple = MessageFormatter.format(format, arg1, arg2);
    log(Level.INFO, LOGGER_FQCN, formattingTuple.getMessage(), formattingTuple.getThrowable());
  }
}

代码示例来源:origin: jboss.web/jbossweb

public void resume() throws Exception {
  try {
    endpoint.resume();
  } catch (Exception ex) {
    log.error(sm.getString("http11protocol.endpoint.resumeerror"), ex);
    throw ex;
  }
  if (log.isInfoEnabled())
    log.info(sm.getString("http11protocol.resume", getName()));
}

代码示例来源:origin: jboss.web/jbossweb

public void destroy() throws Exception {
  if (log.isInfoEnabled())
    log.info(sm.getString("ajpprotocol.stop", getName()));
  endpoint.destroy();
  if (tpOname!=null)
    Registry.getRegistry(null, null).unregisterComponent(tpOname);
  if (rgOname != null)
    Registry.getRegistry(null, null).unregisterComponent(rgOname);
}

代码示例来源:origin: jboss.web/jbossweb

public void destroy() throws Exception {
  if (log.isInfoEnabled())
    log.info(sm.getString("ajpprotocol.stop", getName()));
  endpoint.destroy();
  if (tpOname!=null)
    Registry.getRegistry(null, null).unregisterComponent(tpOname);
  if (rgOname != null)
    Registry.getRegistry(null, null).unregisterComponent(rgOname);
}

代码示例来源:origin: jboss.web/jbossweb

public void destroy() throws Exception {
  if(log.isInfoEnabled())
    log.info(sm.getString("http11protocol.stop", getName()));
  endpoint.destroy();
  if( tpOname!=null )
    Registry.getRegistry(null, null).unregisterComponent(tpOname);
  if( rgOname != null )
    Registry.getRegistry(null, null).unregisterComponent(rgOname);
}

相关文章