code: public void setWsTraceHandler(String id, WsTraceHandler ref) {
          if (id != null && ref != null) {
              RERWLOCK.writeLock().lock();
              try {
                  wsTraceHandlerServices.put(id, ref);
  
                  /*
                   * Route prev traces to the new LogHandler.
                   *
                   * This is primarily for solving the problem during server init where the WsTraceRouterImpl
                   * is registered *after* we've already issued some early startup traces. We cache
                   * these early traces in the "earlierTraces" queue in BaseTraceService, which then
                   * passes them to WsTraceRouterImpl once it's registered.
                   */
                  if (earlierTraces == null) {
                      return;
                  }
                  for (RoutedMessage earlierTrace : earlierTraces.toArray(new RoutedMessage[earlierTraces.size()])) {
                      if (earlierTrace != null) {
                          routeTo(earlierTrace, id);
                      }
                  }
              } finally {
                  RERWLOCK.writeLock().unlock();
              }
          }
      }
docs: Add the wsTraceHandler ref. 1 or more LogHandlers may be set.