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

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

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

Logger.isTraceEnabled介绍

[英]Check to see if the TRACE level is enabled for this logger.
[中]检查此记录器是否启用了跟踪级别。

代码示例

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

public JChannelWrapper addRef() {
 this.refCount++;
 if (logger.isTraceEnabled())
   logger.trace(this + "::RefCount++ = " + refCount + " on channel " + channelName);
 return this;
}

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

/**
 * Constructs a HiLoOptimizer
 *
 * @param returnClass The Java type of the values to be generated
 * @param incrementSize The increment size.
 */
public HiLoOptimizer(Class returnClass, int incrementSize) {
  super( returnClass, incrementSize );
  if ( incrementSize < 1 ) {
    throw new HibernateException( "increment size cannot be less than 1" );
  }
  if ( log.isTraceEnabled() ) {
    log.tracev( "Creating hilo optimizer with [incrementSize={0}; returnClass={1}]", incrementSize, returnClass.getName() );
  }
}

代码示例来源:origin: org.jboss.jbossts/jbossjta

/**
 * Remove the specified thread from the transaction.
 *
 * @return <code>true</code> if successful, <code>false</code>
 *         otherwise.
 */
public final boolean removeChildThread (String threadId)
{
  if (tsLogger.logger.isTraceEnabled()) {
    tsLogger.logger.trace("BasicAction::removeChildThread () action "+get_uid()+" removing "+threadId);
  }
  if (threadId == null)
    return false;
  boolean result = false;
  criticalStart();
  synchronized (this)
  {
    if (_childThreads != null)
    {
      _childThreads.remove(threadId);
      result = true;
    }
  }
  criticalEnd();
  if (tsLogger.logger.isTraceEnabled())
  {
    tsLogger.logger.trace("BasicAction::removeChildThread () action "+get_uid()+" removing "+threadId+" result = "+result);
  }
  return result;
}

代码示例来源:origin: org.jboss.narayana.jts/narayana-jts-integration

/**
 *  Return a transaction propagation context for the transaction
 *  currently associated with the invoking thread, or <code>null</code>
 *  if the invoking thread is not associated with a transaction.
 */
public Object getTransactionPropagationContext()
{
  if (jbossatxLogger.logger.isTraceEnabled()) {
    jbossatxLogger.logger.trace("PropagationContextManager.getTransactionPropagationContext - called");
  }
  String txid = ((BasicAction.Current() == null) ? null : BasicAction.Current().get_uid().stringForm());
  if (jbossatxLogger.logger.isTraceEnabled()) {
    jbossatxLogger.logger.trace("PropagationContextManager.getTransactionPropagationContext() - returned tpc = " + txid);
  }
  
  return txid;
}

代码示例来源:origin: org.jboss.jbossts.jta/narayana-jta

/**
 * Remove the specified thread from the transaction.
 *
 * @return <code>true</code> if successful, <code>false</code>
 *         otherwise.
 */
public final boolean removeChildThread (String threadId)
{
  if (tsLogger.logger.isTraceEnabled()) {
    tsLogger.logger.trace("BasicAction::removeChildThread () action "+get_uid()+" removing "+threadId);
  }
  if (threadId == null)
    return false;
  boolean result = false;
  criticalStart();
  synchronized (this)
  {
    if (_childThreads != null)
    {
      _childThreads.remove(threadId);
      result = true;
    }
  }
  criticalEnd();
  if (tsLogger.logger.isTraceEnabled())
  {
    tsLogger.logger.trace("BasicAction::removeChildThread () action "+get_uid()+" removing "+threadId+" result = "+result);
  }
  return result;
}

代码示例来源:origin: org.jboss.jbossts/jbossjts-integration

/**
 *  Return a transaction propagation context for the transaction
 *  currently associated with the invoking thread, or <code>null</code>
 *  if the invoking thread is not associated with a transaction.
 */
public Object getTransactionPropagationContext()
{
  if (jbossatxLogger.logger.isTraceEnabled()) {
    jbossatxLogger.logger.trace("PropagationContextManager.getTransactionPropagationContext - called");
  }
  String txid = ((BasicAction.Current() == null) ? null : BasicAction.Current().get_uid().stringForm());
  if (jbossatxLogger.logger.isTraceEnabled()) {
    jbossatxLogger.logger.trace("PropagationContextManager.getTransactionPropagationContext() - returned tpc = " + txid);
  }
  
  return txid;
}

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

public void addReceiver(JGroupsReceiver jGroupsReceiver) {
 synchronized (receivers) {
   if (logger.isTraceEnabled())
    logger.trace(this + "::Add Receiver: " + jGroupsReceiver + " on " + channelName);
   receivers.add(jGroupsReceiver);
 }
}

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

/**
 * Constructs a LegacyHiLoAlgorithmOptimizer
 *
 * @param returnClass The Java type of the values to be generated
 * @param incrementSize The increment size.
 */
public LegacyHiLoAlgorithmOptimizer(Class returnClass, int incrementSize) {
  super( returnClass, incrementSize );
  if ( incrementSize < 1 ) {
    throw new HibernateException( "increment size cannot be less than 1" );
  }
  if ( log.isTraceEnabled() ) {
    log.tracev( "Creating hilo optimizer (legacy) with [incrementSize={0}; returnClass={1}]", incrementSize, returnClass.getName() );
  }
  initialMaxLo = incrementSize;
}

代码示例来源:origin: org.jboss.narayana.arjunacore/arjuna

/**
 * Remove the specified thread from the transaction.
 *
 * @return <code>true</code> if successful, <code>false</code>
 *         otherwise.
 */
public final boolean removeChildThread (String threadId)
{
  if (tsLogger.logger.isTraceEnabled()) {
    tsLogger.logger.trace("BasicAction::removeChildThread () action "+get_uid()+" removing "+threadId);
  }
  if (threadId == null)
    return false;
  boolean result = false;
  criticalStart();
  synchronized (this)
  {
    if (_childThreads != null)
    {
      _childThreads.remove(threadId);
      result = true;
    }
  }
  criticalEnd();
  if (tsLogger.logger.isTraceEnabled())
  {
    tsLogger.logger.trace("BasicAction::removeChildThread () action "+get_uid()+" removing "+threadId+" result = "+result);
  }
  return result;
}

代码示例来源:origin: org.jboss.jbossts/jbossjta-integration

/**
 *  Return a transaction propagation context for the transaction
 *  currently associated with the invoking thread, or <code>null</code>
 *  if the invoking thread is not associated with a transaction.
 */
public Object getTransactionPropagationContext()
{
  if (jbossatxLogger.logger.isTraceEnabled()) {
    jbossatxLogger.logger.trace("PropagationContextManager.getTransactionPropagationContext - called");
  }
  String txid = ((BasicAction.Current() == null) ? null : BasicAction.Current().get_uid().stringForm());
  if (jbossatxLogger.logger.isTraceEnabled()) {
    jbossatxLogger.logger.trace("PropagationContextManager.getTransactionPropagationContext() - returned tpc = " + txid);
  }
  
  return txid;
}

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

private void queueExecutor() {
 if (logger.isTraceEnabled()) {
   logger.trace(this + "::Adding Runner on Executor for delivery");
 }
 sessionExecutor.execute(runner);
}

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

if ( log.isTraceEnabled() ) {
  log.tracev(
      "Reassociating transient instance: {0}",
      MessageHelper.infoString( persister, id, event.getSession().getFactory() )

代码示例来源:origin: org.jboss.jbossts.arjunacore/arjunacore

/**
 * Remove the specified thread from the transaction.
 *
 * @return <code>true</code> if successful, <code>false</code>
 *         otherwise.
 */
public final boolean removeChildThread (String threadId)
{
  if (tsLogger.logger.isTraceEnabled()) {
    tsLogger.logger.trace("BasicAction::removeChildThread () action "+get_uid()+" removing "+threadId);
  }
  if (threadId == null)
    return false;
  boolean result = false;
  criticalStart();
  synchronized (this)
  {
    if (_childThreads != null)
    {
      _childThreads.remove(threadId);
      result = true;
    }
  }
  criticalEnd();
  if (tsLogger.logger.isTraceEnabled())
  {
    tsLogger.logger.trace("BasicAction::removeChildThread () action "+get_uid()+" removing "+threadId+" result = "+result);
  }
  return result;
}

代码示例来源:origin: org.jboss.jbossts/jbossjta

public int topLevelAbort ()
{
if (txojLogger.logger.isTraceEnabled())
{
  txojLogger.logger.trace("CadaverLockRecord::topLevelAbort() for "+order());
}

if (doRelease)
{
  if (super.actionHandle == null)
  {
    throw new FatalError(txojLogger.i18NLogger.get_CadaverLockRecord_3());
  }
  CadaverLockManager manager = new CadaverLockManager(order(), objectTypeName);
  return (manager.releaseAll(super.actionHandle.get_uid()) ? TwoPhaseOutcome.FINISH_OK : TwoPhaseOutcome.FINISH_ERROR);
}
else
  return TwoPhaseOutcome.FINISH_OK;
}

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

private ChannelBroadcastEndpointFactory(JChannelManager manager, JChannel channel, String channelName) {
 if (logger.isTraceEnabled()) {
   logger.trace("new ChannelBroadcastEndpointFactory(" + manager + ", " + channel + ", " + channelName, new Exception("trace"));
 }
 this.manager = manager;
 this.channel = channel;
 this.channelName = channelName;
}

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

if ( log.isTraceEnabled() ) {
  log.tracev(
      "Initializing object from ResultSet: {0}",
      MessageHelper.infoString(
      : null;
  if ( rowId != null && log.isTraceEnabled() ) {
    log.tracev(
        "extracted ROWID value: {0}",
        rowId

代码示例来源:origin: org.jboss.narayana.arjunacore/arjunacore

/**
 * Remove the specified thread from the transaction.
 *
 * @return <code>true</code> if successful, <code>false</code>
 *         otherwise.
 */
public final boolean removeChildThread (String threadId)
{
  if (tsLogger.logger.isTraceEnabled()) {
    tsLogger.logger.trace("BasicAction::removeChildThread () action "+get_uid()+" removing "+threadId);
  }
  if (threadId == null)
    return false;
  boolean result = false;
  criticalStart();
  synchronized (this)
  {
    if (_childThreads != null)
    {
      _childThreads.remove(threadId);
      result = true;
    }
  }
  criticalEnd();
  if (tsLogger.logger.isTraceEnabled())
  {
    tsLogger.logger.trace("BasicAction::removeChildThread () action "+get_uid()+" removing "+threadId+" result = "+result);
  }
  return result;
}

代码示例来源:origin: org.jboss.jbossts/jbossjta

public int topLevelCommit ()
{
if (txojLogger.logger.isTraceEnabled())
{
  txojLogger.logger.trace("CadaverLockRecord::topLevelCommit() for "+order());
}

if (doRelease)
{
  if (super.actionHandle == null)
  {
    throw new FatalError(txojLogger.i18NLogger.get_CadaverLockRecord_4());
  }
  CadaverLockManager manager = new CadaverLockManager(order(), objectTypeName);
  return (manager.releaseAll(super.actionHandle.get_uid()) ? TwoPhaseOutcome.FINISH_OK : TwoPhaseOutcome.FINISH_ERROR);
}
else
  return TwoPhaseOutcome.FINISH_OK;
}

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

public void removeClusterTopologyListener(final ClusterTopologyListener listener) {
 if (logger.isTraceEnabled()) {
   logger.trace(this + "::Removing topology listener " + listener, new Exception("Trace"));
 }
 synchronized (topologyListeners) {
   topologyListeners.remove(listener);
 }
}

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

if ( log.isTraceEnabled() ) {
  log.tracev(
      "Locking {0} in mode: {1}",
      MessageHelper.infoString( persister, entry.getId(), source.getFactory() ),

相关文章