Route the message to the LogHandler identified by the given logHandlerId.

@param msg The fully formatted message.
@param logRecord The associated LogRecord, in case the LogHandler needs it.
@param logHandlerId The LogHandler ID in which to route.
164564
protected void routeTo(RoutedMessage routedMessage, String logHandlerId) {
        WsLogHandler wsLogHandler = wsLogHandlerServices.get(logHandlerId);
        if (wsLogHandler != null) {
            wsLogHandler.publish(routedMessage);
        }
    }
1043340
@Trivial
    public final void logToJobLoggerAndTraceLog(String logMsg) {
        Logger logger = getClassNameLogger();

        JoblogUtil.logRawMsgToJobLogAndTraceOnly(Level.FINE, logMsg, logger);
    }
375267
def log(self, msg):
        
        self._execActions('log', msg)
        msg = self._execFilters('log', msg)
        self._processMsg('log', msg)
        self._sendMsg('log', msg)
868203
protected void setLogHandler(ServiceReference<LogHandler> ref) {
        getMessageRouter().setLogHandler((String) ref.getProperty("id"), bundleContext.getService(ref));
    }
416912
public void log(Level level, String message, Object... args) {
      if (logger.isLoggable(level)) {
         String errorMessage = "";
         Throwable thrown = null;
         Object[] params = null;

         if (args == null || args.length == 0) {
            errorMessage = message;
         } else if (args[0] instanceof Throwable) {
            thrown = (Throwable) args[0];
            if (args.length > 1) {
               params = new Object[args.length - 1];
               System.arraycopy(args, 1, params, 0, args.length - 1);
            }
         } else if (args[args.length - 1] instanceof Throwable) {
            params = new Object[args.length - 1];
            System.arraycopy(args, 0, params, 0, args.length - 1);
            thrown = (Throwable) args[args.length - 1];
         } else {
            params = new Object[args.length];
            System.arraycopy(args, 0, params, 0, args.length);
         }

         if (params != null) {
            errorMessage = MessageFormat.format(message, params);
         }

         LogRecord record = new LogRecord(level, errorMessage);
         record.setLoggerName(logger.getName());
         record.setThrown(thrown);
         record.setParameters(args);
         logger.log(record);
      }
   }
605480
public void messageLogged(final BuildEvent event) {
        int priority = event.getPriority();
        // Filter out messages based on priority
        if (priority <= msgOutputLevel) {

            final String msg = expandMessage(event, event.getMessage());

            if (priority != Project.MSG_ERR) {
                printMessage(msg, out, priority);
            } else {
                printMessage(msg, err, priority);
            }
            log(msg);
        }
    }
1139455
public void logDomNode (String msg, Node node) {
		StackTraceElement caller = StackTraceUtils.getCallerStackTraceElement ();
		
		logDomNode (msg, node, Level.FINER, caller);
	}
955798
public LogNode log(final String msg, final Throwable e) {
        return addChild("", msg, -1L).addChild(e);
    }
344433
protected void addMsgToLogHandler(String msgId, String handlerId) {
        Set<String> logHandlerIdSet = getOrCreateLogHandlerIdSet(msgId);
        logHandlerIdSet.add(handlerId);
    }
1053496
private void logIfEnabled(String callerFQCN, Level level, Throwable throwable, String format, Object[] arguments){
		if(logger.isLoggable(level)){
			LogRecord record = new LogRecord(level, StrUtil.format(format, arguments));
			record.setLoggerName(getName());
			record.setThrown(throwable);
			fillCallerData(callerFQCN, record);
			logger.log(record);
		}
	}
659296
public void trace(String msg, Throwable t) {
        if (!logger.isTraceEnabled())
            return;

        if (instanceofLAL) {
            ((LocationAwareLogger) logger).log(null, fqcn, LocationAwareLogger.TRACE_INT, msg, null, t);
        } else {
            logger.trace(msg, t);
        }
    }
585129
public void trace(String loggerFqcn, Object message, Object[] params, Throwable t) {
        doLog(Level.TRACE, loggerFqcn, message, params, t);
    }
76801
public void setWsLogHandler(String id, WsLogHandler ref) {
        if (id != null && ref != null) {
            //There can be many Reader locks, but only one writer lock.
            //This ReaderWriter lock is needed to avoid duplicate messages when the class is passing on EarlyBuffer messages to the new WsLogHandler.
            RERWLOCK.writeLock().lock();
            try {
                wsLogHandlerServices.put(id, ref);
                /*
                 * Route prev messages to the new LogHandler.
                 *
                 * This is primarily for solving the problem during server init where the WsMessageRouterImpl
                 * is registered *after* we've already issued some early startup messages. We cache
                 * these early messages in the "earlierMessages" queue in BaseTraceService, which then
                 * passes them to WsMessageRouterImpl once it's registered.
                 */
                if (earlierMessages == null) {
                    return;
                }

                for (RoutedMessage earlierMessage : earlierMessages.toArray(new RoutedMessage[earlierMessages.size()])) {
                    if (shouldRouteMessageToLogHandler(earlierMessage, id)) {
                        routeTo(earlierMessage, id);
                    }
                }
            } finally {
                RERWLOCK.writeLock().unlock();
            }

        }
    }
849255
public void trace(String msg) {
        logger.log(FQCN, traceCapable ? Level.TRACE : Level.DEBUG, msg, null);
    }
4730
private void log(String callerFQCN, Level level, String msg, Throwable t) {
        // millis and thread are filled by the constructor
        LogRecord record = new LogRecord(level, msg);
        record.setLoggerName(getName());
        record.setThrown(t);
        // Note: parameters in record are not set because SLF4J only
        // supports a single formatting style
        fillCallerData(callerFQCN, record);
        loggerImpl.log(record);
    }
221753
def handle_log_message(msg):  # pylint: disable=useless-return
    """"""
    msg.gateway.can_log = True
    _LOGGER.debug(
        'n:%s c:%s t:%s s:%s p:%s', msg.node_id, msg.child_id, msg.type,
        msg.sub_type, msg.payload)
    return None
479291
@Override
    public String formatMessage(LogRecord logRecord) {
        if (System.getSecurityManager() == null) {
            return formatMessage(logRecord, logRecord.getParameters(), true);
        } else {
            final LogRecord f_logRecord = logRecord;
            return AccessController.doPrivileged(new PrivilegedAction<String>() {
                @Override
                public String run() {
                    return formatMessage(f_logRecord, f_logRecord.getParameters(), true);
                }
            });
        }

    }