This is called by the EJB container server code to write a
ejb bean state record to the trace log, if enabled.
490114
public static void traceBeanState(int oldState, String oldString, int newState, String newString) // d167264
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
        {
            StringBuffer sbuf = new StringBuffer();

            sbuf
                            .append(BeanLifeCycle_State_Type_Str).append(DataDelimiter)
                            .append(BeanLifeCycle_State_Type).append(DataDelimiter)
                            .append(oldState).append(DataDelimiter) // d167264
                            .append(oldString).append(DataDelimiter) // d167264
                            .append(newState).append(DataDelimiter) // d167264
                            .append(newString).append(DataDelimiter) // d167264
            ;

            Tr.debug(tc, sbuf.toString());
        }
    }
1317089
@Override
  public void publish(LogRecord record) {
    // Convert Log
    Throwable throwable = record.getThrown();
    if (throwable != null) {
      synchronized (ExceptionRepositoryAsMetrics.INSTANCE) {
        // We would not include the message if already exceeded the exceptions limit
        if (ExceptionRepositoryAsMetrics.INSTANCE.getExceptionsCount() >= exceptionsLimit) {
          droppedExceptionsCount.incr();
          return;
        }

        // Convert the record
        StringWriter sink = new StringWriter();
        throwable.printStackTrace(new PrintWriter(sink, true));
        String trace = sink.toString();

        Metrics.ExceptionData.Builder exceptionDataBuilder =
            ExceptionRepositoryAsMetrics.INSTANCE.getExceptionInfo(trace);
        exceptionDataBuilder.setCount(exceptionDataBuilder.getCount() + 1);
        exceptionDataBuilder.setLasttime(new Date().toString());
        exceptionDataBuilder.setStacktrace(trace);

        // Can cause NPE and crash HI
        //exceptionDataBuilder.setLogging(record.getMessage());

        if (record.getMessage() == null) {
          exceptionDataBuilder.setLogging("");
        } else {
          exceptionDataBuilder.setLogging(record.getMessage());
        }
      }
    }
  }
1029787
@Override
  public final void publish(LogRecord record)
  {
    if (! isLoggable(record)) {
      return;
    }

    Filter filter = getFilter();

    if (filter != null && ! filter.isLoggable(record))
      return;

    if (record == null) {
      System.out.println(this + ": no record");
      return;
    }

    //synchronized (this) {
      processPublish(record);
      //processFlush();
    //}

    /*
    _logQueue.offer(record);

    if (CurrentTime.isTest()) {
      waitForEmpty();
    }
    */
  }
1101647
public void prepareUpdateStep1bOutput(JspWriter out) throws IOException {

        m_oldLoggingDBOffset = m_newLoggingDBOffset;
        m_newLoggingDBOffset = m_dbUpdateThread.getLoggingThread().getMessages().size();
        if (isInitialized()) {
            for (int i = m_oldLoggingDBOffset; i < m_newLoggingDBOffset; i++) {
                String str = m_dbUpdateThread.getLoggingThread().getMessages().get(i).toString();
                str = CmsEncoder.escapeWBlanks(str, CmsEncoder.ENCODING_UTF_8);
                out.println("output[" + (i - m_oldLoggingDBOffset) + "] = \"" + str + "\";");
            }
        } else {
            out.println("output[0] = 'ERROR';");
        }

        boolean threadFinished = m_dbUpdateThread.isFinished();
        boolean allWritten = m_oldLoggingDBOffset >= m_dbUpdateThread.getLoggingThread().getMessages().size();

        out.println("function initThread() {");
        if (isInitialized()) {
            out.print("send();");
            if (threadFinished && allWritten) {
                out.println("setTimeout('top.display.finish()', 1000);");
            } else {
                int timeout = 5000;
                if (getUpdateDBThread().getLoggingThread().getMessages().size() < 20) {
                    timeout = 2000;
                }
                out.println("setTimeout('location.reload()', " + timeout + ");");
            }
        }
        out.println("}");
    }
585129
public void trace(String loggerFqcn, Object message, Object[] params, Throwable t) {
        doLog(Level.TRACE, loggerFqcn, message, params, t);
    }
576646
void writeRecord(EngineOutputRecord eor) throws IOException {
        // eventually compress as well.
        writer.writeRecord(eor, writeMAC, writeCipher);

        /*
         * Check the sequence number state
         *
         * Note that in order to maintain the connection I/O
         * properly, we check the sequence number after the last
         * record writing process. As we request renegotiation
         * or close the connection for wrapped sequence number
         * when there is enough sequence number space left to
         * handle a few more records, so the sequence number
         * of the last record cannot be wrapped.
         */
        if ((connectionState < cs_ERROR) && !isOutboundDone()) {
            checkSequenceNumber(writeMAC, eor.contentType());
        }
    }
1010396
public void trace(Object message) {
        doLog(Level.TRACE, FQCN, message, null, null);
    }
1186036
private void handleStatus(Status status) {

        Log.d(TAG, "Handling Bean status: " + status);

        BeanState beanState = status.beanState();

        if (beanState == BeanState.READY) {
            resetSketchStateTimeout();

            if (sketchUploadState == SketchUploadState.SENDING_START_COMMAND) {
                sketchUploadState = SketchUploadState.SENDING_BLOCKS;
                stopSketchStateTimeout();
                sendNextSketchBlock();

            }

        } else if (beanState == BeanState.PROGRAMMING) {
            resetSketchStateTimeout();

        } else if (beanState == BeanState.COMPLETE) {
            if (onSketchUploadComplete != null) onSketchUploadComplete.run();
            resetSketchUploadState();

        } else if (beanState == BeanState.ERROR) {
            returnUploadError(BeanError.UNKNOWN);
            resetSketchUploadState();

        }

    }
1313556
public static void tracePostInvokeBegins(EJSDeployedSupport s,
                                             EJSWrapperBase wrapper)
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
        {
            StringBuffer sbuf = new StringBuffer();

            sbuf
                            .append(MthdPostInvokeEntry_Type_Str).append(DataDelimiter)
                            .append(MthdPostInvokeEntry_Type).append(DataDelimiter);

            writeDeployedSupportInfo(s, sbuf, wrapper, null);

            Tr.debug(tc, sbuf.toString());
        }
    }
668212
public void trace(Object arg0, Throwable arg1)
    {
        if (isTraceEnabled())
            message(TRACE,new Object[]{arg0,arg1},new Frame(1));
    }
1295115
private void writeObject(java.io.ObjectOutputStream out) throws IOException {
        if (svLogger.isLoggable(Level.FINER))
            svLogger.logp(Level.FINER, CLASS_NAME, "writeObject", toString());

        // if ivServer object is null throw and exception because there is no server side
        // Future object to communicate with.
        if (ivServer == null) {
            throw new EJBException("No Server side Future object exists.");
        }
        out.defaultWriteObject();
        // write out the header information
        out.write(Constants.CLIENT_ASYNC_RESULT_EYE_CATCHER);
        out.writeShort(Constants.PLATFORM_DISTRIBUTED);
        out.writeShort(Constants.CLIENT_ASYNC_RESULT_V1);

        // write out the data
        out.writeObject(ivServer);
        out.writeBoolean(ivBusinessRmiRemote);
    }
1254006
public void write(Bean bean, Appendable output) throws IOException {
        write(bean, true, output);
    }
438745
void writeStatement(Session session, String s) {

        try {
            dbLogWriter.writeLogStatement(session, s);
        } catch (IOException e) {
            throw Error.error(ErrorCode.FILE_IO_ERROR, logFileName);
        }

        if (maxLogSize > 0 && dbLogWriter.size() > maxLogSize) {
            database.logger.needsCheckpoint = true;
        }
    }
354982
public void trace(final IJNRPEExecutionContext ctx, final String message) {
        postEvent(ctx, new LogEvent(source, LogEventType.TRACE, message));
    }
899505
public static void printStackTrace(StackTraceElement[] trace, java.io.PrintWriter out) {
        Strand.printStackTrace(trace, out);
    }
1164562
def enable_capture_state(self, state, writeToHw=False):
        
        if state:
            activePorts = self.rePortInList.findall(self.activePortList)
            self.activeCapturePortList = "{{" + activePorts[0] + "}}"
        else:
            self.activeCapturePortList = "{{""}}"
        if (writeToHw):
            self.ix_command('write')
645786
public void trace(Object message, Throwable exception) {
    log(Level.TRACE, message, exception);
  }