Adds a trace to the log.

@param trace Trace to add.
@throws ParameterException
516832
public void addTrace(LogTrace<E> trace) throws ParameterException {
                Validate.notNull(trace);
                trace.setCaseNumber(traces.size() + 1);
                traces.add(trace);
                summary.addTrace(trace);
                if (!distinctTraces.add(trace)) {
                        for (LogTrace<E> storedTrace : traces) {
                                if (storedTrace.equals(trace)) {
                                        storedTrace.addSimilarInstance(trace.getCaseNumber());
                                        trace.addSimilarInstance(storedTrace.getCaseNumber());
                                }
                        }
                }
        }
1082279
public static void traceException(TraceComponent callersTrace, Throwable ex)
   {
     if (light_tc.isDebugEnabled() || callersTrace.isDebugEnabled()) {

       // Find XA completion code if one exists, as this isn't in a normal dump
       String xaErrStr = null;
       if (ex instanceof XAException) {
         XAException xaex = (XAException)ex; 
         xaErrStr = "XAExceptionErrorCode: " + xaex.errorCode;
       }

       // Trace using the correct trace group
       if (light_tc.isDebugEnabled()) {
         if (xaErrStr != null) SibTr.debug(light_tc, xaErrStr);
         SibTr.exception(light_tc, ex);
       }
       else {
         if (xaErrStr != null) SibTr.debug(callersTrace, xaErrStr);
         SibTr.exception(callersTrace, ex);
       }
     }
   }
354982
public void trace(final IJNRPEExecutionContext ctx, final String message) {
        postEvent(ctx, new LogEvent(source, LogEventType.TRACE, message));
    }
363945
def log_trace(self, tag, original, loc, tokens=None, extra=None):
        """"""
        if self.tracing:
            tag, original, loc = displayable(tag), displayable(original), int(loc)
            if "{" not in tag:
                out = ["[" + tag + "]"]
                add_line_col = True
                if tokens is not None:
                    if isinstance(tokens, Exception):
                        msg = displayable(str(tokens))
                        if "{" in msg:
                            head, middle = msg.split("{", 1)
                            middle, tail = middle.rsplit("}", 1)
                            msg = head + "{...}" + tail
                        out.append(msg)
                        add_line_col = False
                    elif len(tokens) == 1 and isinstance(tokens[0], str):
                        out.append(ascii(tokens[0]))
                    else:
                        out.append(ascii(tokens))
                if add_line_col:
                    out.append("(line:" + str(lineno(loc, original)) + ", col:" + str(col(loc, original)) + ")")
                if extra is not None:
                    out.append("from " + ascii(extra))
                printerr(*out)
147677
protected void logException (final Object caller, final Throwable t, final Object[] parameters) {
		logException(t, "{}: Exception in '{}' for parameters: {}", new Object[] { getReplacement(), caller, getParametersAsString(parameters) });
	}
994475
@Override
    public void setTraceRouter(WsTraceRouter traceRouter) {

        internalTraceRouter.set(traceRouter);

        // Pass the earlierMessages queue to the router.
        // Now that the internalMessageRouter is non-null, this class will
        // NOT add any more messages to the earlierMessages queue.
        // The MessageRouter basically owns the earlierMessages queue
        // from now on.
        if (earlierTraces != null) {
            synchronized (this) {
                if (earlierTraces != null) {
                    traceRouter.setEarlierTraces(earlierTraces);
                }
            }
        } else {
            traceRouter.setEarlierTraces(null);
        }
    }
234628
public static void printStackTrace(StackTraceElement[] trace, java.io.PrintStream out) {
        Strand.printStackTrace(trace, out);
    }
998152
@Override
  final public TraceMethod entry(String returnType, Object object, String methodSignature) {
    return null;
  }
903861
protected void logDebug(String id, String messageTemplate, Object... parameters) {
    if(delegateLogger.isDebugEnabled()) {
      String msg = formatMessageTemplate(id, messageTemplate);
      delegateLogger.debug(msg, parameters);
    }
  }
132894
public static void trace(String format, Object... arguments) {
		trace(LogFactory.indirectGet(), format, arguments);
	}
287846
public void trace(Object message, Throwable t) {
        doLog(Level.TRACE, FQCN, message, null, t);
    }
1243451
private void setStackTrace(Throwable e) {
        // Convert stack trace to a String
        StringWriter sw = new StringWriter();
        PrintWriter pw = new PrintWriter(sw);
        e.printStackTrace(pw);
        stackTrace = sw.toString();
        setLineSeparator(getLineSeparatorProperty());
    }
504388
public void trace(Object message) {
        differentiatedLog(null, LOGGER_FQCN, LocationAwareLogger.TRACE_INT, message, null);
    }
1350878
public void tracef(Throwable t, String format, Object... params) {
        doLogf(Level.TRACE, FQCN, format, params, t);
    }
849255
public void trace(String msg) {
        logger.log(FQCN, traceCapable ? Level.TRACE : Level.DEBUG, msg, null);
    }
520500
public void setTraceIds(java.util.Collection<String> traceIds) {
        if (traceIds == null) {
            this.traceIds = null;
            return;
        }

        this.traceIds = new java.util.ArrayList<String>(traceIds);
    }
1010396
public void trace(Object message) {
        doLog(Level.TRACE, FQCN, message, null, null);
    }