org.apache.openejb.util.Logger.isDebugEnabled()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(6.1k)|赞(0)|评价(0)|浏览(159)

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

Logger.isDebugEnabled介绍

暂无

代码示例

代码示例来源:origin: org.apache.openejb/openejb-core

public static WebBeansContext enter(final WebBeansContext newOWBContext) {
  final WebBeansContext oldContext = contexts.get();
  if (newOWBContext != null) {
    contexts.set(newOWBContext);
  } else {
    contexts.remove();
  }
  if (logger.isDebugEnabled()) {
    logger.debug("Enter:'" + newOWBContext + "'");
  }
  return oldContext;
}

代码示例来源:origin: org.apache.openejb/openejb-core

public String debug(final String message, final Throwable t) {
  if (isDebugEnabled()) {
    final String msg = getMessage(message, baseName);
    logStream.debug(msg, t);
    return msg;
  }
  return message;
}

代码示例来源:origin: org.apache.openejb/openejb-core

@Override
public void begin() throws NotSupportedException, SystemException {
  transactionManager().begin();
  if (transactionLogger.isDebugEnabled()) {
    transactionLogger.debug("Started user transaction " + transactionManager().getTransaction());
  }
}

代码示例来源:origin: org.apache.openejb/openejb-core

@Override
public void commit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException,
  SecurityException, IllegalStateException, SystemException {
  if (transactionLogger.isDebugEnabled()) {
    transactionLogger.debug("Committing user transaction " + transactionManager().getTransaction());
  }
  transactionManager().commit();
}

代码示例来源:origin: org.apache.openejb/openejb-core

@Override
public void rollback() throws IllegalStateException, SecurityException, SystemException {
  if (transactionLogger.isDebugEnabled()) {
    transactionLogger.debug("Rolling back user transaction " + transactionManager().getTransaction());
  }
  transactionManager().rollback();
}

代码示例来源:origin: org.apache.tomee/openejb-core

public String debug(final String message, final Throwable t) {
  if (isDebugEnabled()) {
    final String msg = getMessage(message, baseName);
    logStream.debug(msg, t);
    return msg;
  }
  return message;
}

代码示例来源:origin: org.apache.openejb/openejb-core

@Override
public void clear(final Object key) {
  final WebBeansContext ctx = getContext((ClassLoader) key);
  if (logger.isDebugEnabled()) {
    logger.debug("Clearing:'" + ctx + "'");
  }
  contextByClassLoader.remove(key);
  ctx.clear();
}

代码示例来源:origin: org.apache.tomee/openejb-core

@Override
  public void clear(final Object key) {
    final WebBeansContext ctx = getContext((ClassLoader) key);
    if (logger.isDebugEnabled()) {
      logger.debug("Clearing:'" + ctx + "'");
    }
    contextByClassLoader.remove(key);
    if (ctx != null) {
      ctx.clear();
    }
  }
}

代码示例来源:origin: org.apache.openejb/openejb-core

@Override
public int getStatus() throws SystemException {
  final int status = transactionManager().getStatus();
  if (transactionLogger.isDebugEnabled()) {
    transactionLogger.debug("User transaction " + transactionManager().getTransaction() + " has status " + getStatus(status));
  }
  return status;
}

代码示例来源:origin: org.apache.tomee/openejb-core

@Override
public void begin() throws NotSupportedException, SystemException {
  check();
  transactionManager().begin();
  if (transactionLogger.isDebugEnabled()) {
    transactionLogger.debug("Started user transaction " + transactionManager().getTransaction());
  }
}

代码示例来源:origin: org.apache.tomee/openejb-core

@Override
public void commit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException,
  SecurityException, IllegalStateException, SystemException {
  check();
  if (transactionLogger.isDebugEnabled()) {
    transactionLogger.debug("Committing user transaction " + transactionManager().getTransaction());
  }
  transactionManager().commit();
}

代码示例来源:origin: org.apache.openejb/openejb-core

public String debug(final String message, final Throwable t, final Object... args) {
  if (isDebugEnabled()) {
    String msg = getMessage(message, baseName);
    msg = formatMessage(msg, args);
    logStream.debug(msg, t);
    return msg;
  }
  return message;
}

代码示例来源:origin: org.apache.openejb/openejb-core

public String debug(final String message, final Object... args) {
  if (isDebugEnabled()) {
    String msg = getMessage(message, baseName);
    msg = formatMessage(msg, args);
    logStream.debug(msg);
    return msg;
  }
  return message;
}

代码示例来源:origin: org.apache.openejb/openejb-core

@Override
public void setRollbackOnly() throws SystemException {
  if (transactionLogger.isDebugEnabled()) {
    transactionLogger.debug("Marking user transaction for rollback: " + transactionManager().getTransaction());
  }
  transactionManager().setRollbackOnly();
}

代码示例来源:origin: org.apache.openejb/openejb-core

private static void logExclusions(final String[] exclusionArray) {
  if (logger.isDebugEnabled()) {
    logger.debug("Exclusion prefixes: [");
    for (final String ex : exclusionArray) {
      logger.debug("-" + ex);
    }
    logger.debug("]");
  }
}

代码示例来源:origin: org.apache.tomee/openejb-core

public String debug(final String message, final Throwable t, final Object... args) {
  if (isDebugEnabled()) {
    String msg = getMessage(message, baseName);
    msg = formatMessage(msg, args);
    logStream.debug(msg, t);
    return msg;
  }
  return message;
}

代码示例来源:origin: org.apache.tomee/openejb-core

private static void logExclusions(final String[] exclusionArray) {
  if (logger.isDebugEnabled()) {
    logger.debug("Exclusion prefixes: [");
    for (final String ex : exclusionArray) {
      logger.debug("-" + ex);
    }
    logger.debug("]");
  }
}

代码示例来源:origin: org.apache.tomee/openejb-core

@Override
public int getStatus() throws SystemException {
  check();
  final int status = transactionManager().getStatus();
  if (transactionLogger.isDebugEnabled()) {
    transactionLogger.debug("User transaction " + transactionManager().getTransaction() + " has status " + getStatus(status));
  }
  return status;
}

代码示例来源:origin: org.apache.tomee/openejb-core

@Override
public void setRollbackOnly() throws SystemException {
  check();
  if (transactionLogger.isDebugEnabled()) {
    transactionLogger.debug("Marking user transaction for rollback: " + transactionManager().getTransaction());
  }
  transactionManager().setRollbackOnly();
}

代码示例来源:origin: org.apache.tomee/openejb-server

@Override
public void init(final Properties props) throws Exception {
  this.logger = Logger.getInstance(LogCategory.OPENEJB_SERVER.createChild("service." + getName()), "org.apache.openejb.server.util.resources");
  this.debug = this.logger.isDebugEnabled();
  super.init(props);
}

相关文章