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

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

本文整理了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

  1. public static WebBeansContext enter(final WebBeansContext newOWBContext) {
  2. final WebBeansContext oldContext = contexts.get();
  3. if (newOWBContext != null) {
  4. contexts.set(newOWBContext);
  5. } else {
  6. contexts.remove();
  7. }
  8. if (logger.isDebugEnabled()) {
  9. logger.debug("Enter:'" + newOWBContext + "'");
  10. }
  11. return oldContext;
  12. }

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

  1. public String debug(final String message, final Throwable t) {
  2. if (isDebugEnabled()) {
  3. final String msg = getMessage(message, baseName);
  4. logStream.debug(msg, t);
  5. return msg;
  6. }
  7. return message;
  8. }

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

  1. @Override
  2. public void begin() throws NotSupportedException, SystemException {
  3. transactionManager().begin();
  4. if (transactionLogger.isDebugEnabled()) {
  5. transactionLogger.debug("Started user transaction " + transactionManager().getTransaction());
  6. }
  7. }

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

  1. @Override
  2. public void commit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException,
  3. SecurityException, IllegalStateException, SystemException {
  4. if (transactionLogger.isDebugEnabled()) {
  5. transactionLogger.debug("Committing user transaction " + transactionManager().getTransaction());
  6. }
  7. transactionManager().commit();
  8. }

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

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

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

  1. public String debug(final String message, final Throwable t) {
  2. if (isDebugEnabled()) {
  3. final String msg = getMessage(message, baseName);
  4. logStream.debug(msg, t);
  5. return msg;
  6. }
  7. return message;
  8. }

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

  1. @Override
  2. public void clear(final Object key) {
  3. final WebBeansContext ctx = getContext((ClassLoader) key);
  4. if (logger.isDebugEnabled()) {
  5. logger.debug("Clearing:'" + ctx + "'");
  6. }
  7. contextByClassLoader.remove(key);
  8. ctx.clear();
  9. }

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

  1. @Override
  2. public void clear(final Object key) {
  3. final WebBeansContext ctx = getContext((ClassLoader) key);
  4. if (logger.isDebugEnabled()) {
  5. logger.debug("Clearing:'" + ctx + "'");
  6. }
  7. contextByClassLoader.remove(key);
  8. if (ctx != null) {
  9. ctx.clear();
  10. }
  11. }
  12. }

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

  1. @Override
  2. public int getStatus() throws SystemException {
  3. final int status = transactionManager().getStatus();
  4. if (transactionLogger.isDebugEnabled()) {
  5. transactionLogger.debug("User transaction " + transactionManager().getTransaction() + " has status " + getStatus(status));
  6. }
  7. return status;
  8. }

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

  1. @Override
  2. public void begin() throws NotSupportedException, SystemException {
  3. check();
  4. transactionManager().begin();
  5. if (transactionLogger.isDebugEnabled()) {
  6. transactionLogger.debug("Started user transaction " + transactionManager().getTransaction());
  7. }
  8. }

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

  1. @Override
  2. public void commit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException,
  3. SecurityException, IllegalStateException, SystemException {
  4. check();
  5. if (transactionLogger.isDebugEnabled()) {
  6. transactionLogger.debug("Committing user transaction " + transactionManager().getTransaction());
  7. }
  8. transactionManager().commit();
  9. }

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

  1. public String debug(final String message, final Throwable t, final Object... args) {
  2. if (isDebugEnabled()) {
  3. String msg = getMessage(message, baseName);
  4. msg = formatMessage(msg, args);
  5. logStream.debug(msg, t);
  6. return msg;
  7. }
  8. return message;
  9. }

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

  1. public String debug(final String message, final Object... args) {
  2. if (isDebugEnabled()) {
  3. String msg = getMessage(message, baseName);
  4. msg = formatMessage(msg, args);
  5. logStream.debug(msg);
  6. return msg;
  7. }
  8. return message;
  9. }

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

  1. @Override
  2. public void setRollbackOnly() throws SystemException {
  3. if (transactionLogger.isDebugEnabled()) {
  4. transactionLogger.debug("Marking user transaction for rollback: " + transactionManager().getTransaction());
  5. }
  6. transactionManager().setRollbackOnly();
  7. }

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

  1. private static void logExclusions(final String[] exclusionArray) {
  2. if (logger.isDebugEnabled()) {
  3. logger.debug("Exclusion prefixes: [");
  4. for (final String ex : exclusionArray) {
  5. logger.debug("-" + ex);
  6. }
  7. logger.debug("]");
  8. }
  9. }

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

  1. public String debug(final String message, final Throwable t, final Object... args) {
  2. if (isDebugEnabled()) {
  3. String msg = getMessage(message, baseName);
  4. msg = formatMessage(msg, args);
  5. logStream.debug(msg, t);
  6. return msg;
  7. }
  8. return message;
  9. }

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

  1. private static void logExclusions(final String[] exclusionArray) {
  2. if (logger.isDebugEnabled()) {
  3. logger.debug("Exclusion prefixes: [");
  4. for (final String ex : exclusionArray) {
  5. logger.debug("-" + ex);
  6. }
  7. logger.debug("]");
  8. }
  9. }

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

  1. @Override
  2. public int getStatus() throws SystemException {
  3. check();
  4. final int status = transactionManager().getStatus();
  5. if (transactionLogger.isDebugEnabled()) {
  6. transactionLogger.debug("User transaction " + transactionManager().getTransaction() + " has status " + getStatus(status));
  7. }
  8. return status;
  9. }

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

  1. @Override
  2. public void setRollbackOnly() throws SystemException {
  3. check();
  4. if (transactionLogger.isDebugEnabled()) {
  5. transactionLogger.debug("Marking user transaction for rollback: " + transactionManager().getTransaction());
  6. }
  7. transactionManager().setRollbackOnly();
  8. }

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

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

相关文章