org.modeshape.common.logging.Logger.isTraceEnabled()方法的使用及代码示例

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

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

Logger.isTraceEnabled介绍

[英]Return whether messages at the TRACE level are being logged.
[中]返回是否正在记录跟踪级别的消息。

代码示例

代码示例来源:origin: org.fcrepo/modeshape-jcr

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

代码示例来源:origin: org.modeshape/modeshape-web-jcr

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

代码示例来源:origin: ModeShape/modeshape

@Override
public void rollback() {
  if (logger.isTraceEnabled()) {
    logger.trace("'{0}' ignoring rollback call coming from ModeShape.", id);
  }
  // nothing by default
}

代码示例来源:origin: ModeShape/modeshape

@Override
public void commit()  {
  if (logger.isTraceEnabled()) {
    logger.trace("'{0}' ignoring commit call coming from ModeShape.", id);
  }
  //nothing by default
}

代码示例来源:origin: org.fcrepo/modeshape-jcr

@Override
public void commit()  {
  if (logger.isTraceEnabled()) {
    logger.trace("'{0}' ignoring commit call coming from ModeShape.", id);
  }
  //nothing by default
}

代码示例来源:origin: org.fcrepo/modeshape-jcr

@Override
public void rollback() {
  if (logger.isTraceEnabled()) {
    logger.trace("'{0}' ignoring rollback call coming from ModeShape.", id);
  }
  // nothing by default
}

代码示例来源:origin: org.fcrepo/modeshape-jcr

@Override
public void rollback() throws IllegalStateException, SecurityException, SystemException {
  if (logger.isTraceEnabled()) {
    logger.trace("Rolling back transaction '{0}'", id);
  }
  super.rollback();
}

代码示例来源:origin: org.fcrepo/modeshape-jcr

private void restoreDocument(Document document) {
    if (LOGGER.isTraceEnabled()) {
      LOGGER.trace("restoring doc: {0}", document);
    }
    documentStore.put(document);
  }
}

代码示例来源:origin: ModeShape/modeshape

private void restoreDocument(Document document) {
    if (LOGGER.isTraceEnabled()) {
      LOGGER.trace("restoring doc: {0}", document);
    }
    documentStore.put(document);
  }
}

代码示例来源:origin: org.fcrepo/modeshape-jcr

protected void evictChangedNodes( ChangeSet changes ) {
  if (!closed) {
    if (LOGGER.isTraceEnabled()) {
      LOGGER.trace("Cache for workspace '{0}' received {1} changes from remote sessions: {2}", workspaceName,
             changes.size(), changes);
    }
    // Clear this workspace's cached nodes (iteratively is okay since it's a ConcurrentMap) ...
    for (NodeKey key : changes.changedNodes()) {
      if (closed) break;
      nodesByKey.remove(key);
    }
  }
}

代码示例来源:origin: ModeShape/modeshape

protected void evictChangedNodes( ChangeSet changes ) {
  if (!closed) {
    if (LOGGER.isTraceEnabled()) {
      LOGGER.trace("Cache for workspace '{0}' received {1} changes from remote sessions: {2}", workspaceName,
             changes.size(), changes);
    }
    // Clear this workspace's cached nodes (iteratively is okay since it's a ConcurrentMap) ...
    for (NodeKey key : changes.changedNodes()) {
      if (closed) break;
      nodesByKey.remove(key);
    }
  }
}

代码示例来源:origin: org.fcrepo/modeshape-jcr

@Override
  public void commit()
      throws RollbackException, SecurityException,
          IllegalStateException, SystemException {
    if (logger.isTraceEnabled()) {
      super.commit();
      logger.trace("Committed transaction '{0}'", id);
    } else {
      super.commit();
    }
  }
}

代码示例来源:origin: org.fcrepo/modeshape-jcr

private void batchWriteDocuments(List<String> keys, BackupDocumentWriter contentWriter) {
    documentStore.load(keys).forEach(entry -> {
      if (LOGGER.isTraceEnabled()) {
        LOGGER.trace("backing up doc: {0}", entry.source());
      }
      writeToContentArea(entry, contentWriter);
    });   
  }
}

代码示例来源:origin: ModeShape/modeshape

private void batchWriteDocuments(List<String> keys, BackupDocumentWriter contentWriter) {
    documentStore.load(keys).forEach(entry -> {
      if (LOGGER.isTraceEnabled()) {
        LOGGER.trace("backing up doc: {0}", entry.source());
      }
      writeToContentArea(entry, contentWriter);
    });   
  }
}

代码示例来源:origin: ModeShape/modeshape

@Override
public Document get( String key ) {
  LOGGER.debug("reading {0}", key);
  TransactionStore.TransactionMap<String, Document> txContent = transactionalContent(false);
  Document result = txContent != null ? txContent.getLatest(key) : persistedContent.get(key);
  if (LOGGER.isTraceEnabled()) {
    LOGGER.trace("{0} is {1}", key, result);
  }
  return result;
}

代码示例来源:origin: org.fcrepo/modeshape-jcr

protected final void logSendOperation( ChangeSet changeSet ) {
  if (LOGGER.isTraceEnabled()) {
    LOGGER.trace("Sending to cluster '{0}' {1} changes on workspace {2} made by {3} from process '{4}' at {5}",
           clusteringService.toString(),
           changeSet.size(),
           changeSet.getWorkspaceName(),
           changeSet.getUserData(),
           changeSet.getProcessKey(),
           changeSet.getTimestamp());
  }
}

代码示例来源:origin: org.fcrepo/modeshape-jcr

protected final void logReceivedOperation( ChangeSet changeSet ) {
  if (LOGGER.isTraceEnabled()) {
    LOGGER.trace("Received from cluster '{0}' {1} changes on workspace {2} made by {3} from process '{4}' at {5}",
           clusteringService.toString(),
           changeSet.size(),
           changeSet.getWorkspaceName(),
           changeSet.getUserId(),
           changeSet.getProcessKey(),
           changeSet.getTimestamp());
  }
}

代码示例来源:origin: ModeShape/modeshape

protected final void logReceivedOperation( ChangeSet changeSet ) {
  if (LOGGER.isTraceEnabled()) {
    LOGGER.trace("Received from cluster '{0}' {1} changes on workspace {2} made by {3} from process '{4}' at {5}",
           clusteringService.toString(),
           changeSet.size(),
           changeSet.getWorkspaceName(),
           changeSet.getUserId(),
           changeSet.getProcessKey(),
           changeSet.getTimestamp());
  }
}

代码示例来源:origin: ModeShape/modeshape

protected final void logSendOperation( ChangeSet changeSet ) {
  if (LOGGER.isTraceEnabled()) {
    LOGGER.trace("Sending to cluster '{0}' {1} changes on workspace {2} made by {3} from process '{4}' at {5}",
           clusteringService.toString(),
           changeSet.size(),
           changeSet.getWorkspaceName(),
           changeSet.getUserData(),
           changeSet.getProcessKey(),
           changeSet.getTimestamp());
  }
}

代码示例来源:origin: ModeShape/modeshape

@Test
public void shouldSupportAskingWhetherLoggingLevelsAreEnabled() {
  logger.isErrorEnabled();
  logger.isWarnEnabled();
  logger.isInfoEnabled();
  logger.isDebugEnabled();
  logger.isTraceEnabled();
}

相关文章