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

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

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

Logger.trace介绍

[英]Issue a log message with a level of TRACE.
[中]发出具有跟踪级别的日志消息。

代码示例

代码示例来源: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

private static void dump(Document document) {
    if ( !log.isTraceEnabled() ) {
      return;
    }

    final ByteArrayOutputStream baos = new ByteArrayOutputStream();
    final Writer w = new PrintWriter( baos );

    try {
      final XMLWriter xw = new XMLWriter( w, new OutputFormat( " ", true ) );
      xw.write( document );
      w.flush();
    }
    catch (IOException e1) {
      throw new RuntimeException( "Error dumping enhanced class", e1 );
    }

    log.tracef( "Envers-generate entity mapping -----------------------------\n%s", baos.toString() );
    log.trace( "------------------------------------------------------------" );
  }
}

代码示例来源: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.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.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

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

代码示例来源: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.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

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

代码示例来源: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 nestedCommit ()
{
if (txojLogger.logger.isTraceEnabled())
{
  txojLogger.logger.trace("LockRecord::nestedCommit() for "+order());
}

/* default constructor problem. */
if (managerAddress == null)
  return TwoPhaseOutcome.FINISH_ERROR;
if (actionHandle != null)
{
  Uid toRelease = actionHandle.get_uid();
  
  actionHandle = actionHandle.parent();
  
  return (managerAddress.propagate(toRelease, actionHandle.get_uid()) ? TwoPhaseOutcome.FINISH_OK : TwoPhaseOutcome.FINISH_ERROR);
}
else
{
  txojLogger.i18NLogger.warn_LockRecord_4();
}
return TwoPhaseOutcome.FINISH_ERROR;
}

代码示例来源: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: 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.narayana.jts/narayana-jts-idlj

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

/* default constructor problem. */
if (managerAddress == null)
  return TwoPhaseOutcome.FINISH_ERROR;
if (actionHandle != null)
{
  Uid toRelease = actionHandle.get_uid();
  
  actionHandle = actionHandle.parent();
  
  return (managerAddress.propagate(toRelease, actionHandle.get_uid()) ? TwoPhaseOutcome.FINISH_OK : TwoPhaseOutcome.FINISH_ERROR);
}
else
{
  txojLogger.i18NLogger.warn_LockRecord_4();
}
return TwoPhaseOutcome.FINISH_ERROR;
}

代码示例来源: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: org.jboss.jbossts.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.arjunacore/arjunacore

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

/* default constructor problem. */
if (managerAddress == null)
  return TwoPhaseOutcome.FINISH_ERROR;
if (actionHandle != null)
{
  Uid toRelease = actionHandle.get_uid();
  
  actionHandle = actionHandle.parent();
  
  return (managerAddress.propagate(toRelease, actionHandle.get_uid()) ? TwoPhaseOutcome.FINISH_OK : TwoPhaseOutcome.FINISH_ERROR);
}
else
{
  txojLogger.i18NLogger.warn_LockRecord_4();
}
return TwoPhaseOutcome.FINISH_ERROR;
}

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

public void removeReceiver(JGroupsReceiver receiver) {
 if (logger.isTraceEnabled())
   logger.trace(this + "::removeReceiver: " + receiver + " on " + channelName, new Exception("Trace"));
 synchronized (receivers) {
   receivers.remove(receiver);
 }
}

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

/**
 * 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;
}

相关文章