Generate a runnable task that logs one localized message in an exception-safe way.
@param level
@param message
@param t
@param callerThreadName
@return
555352
private Runnable createRunnableL7dLoggingTask(final Level level,
            final String key, final Object[] params, final Throwable t) {
        // While logging, the logger thread temporarily disguises itself as its caller.
        final String callerThreadName = Thread.currentThread().getName();

        final Runnable runnableLoggingTask = new Runnable() {
            @Override
            public void run() {
                Thread loggerThread = Thread.currentThread();
                loggerThread.setName(callerThreadName);
                try {
                    m_logger.l7dlog(level, key, params, t);
                } catch (Throwable t) {
                    System.err.println("Exception thrown in logging thread for " +
                            callerThreadName + ":" + t);
                } finally {
                    loggerThread.setName(ASYNCH_LOGGER_THREAD_NAME);
                }
            }
        };
        return runnableLoggingTask;
    }
691649
public final void trace(Object message, Throwable t) {

        if (isLevelEnabled(SimpleLog.LOG_LEVEL_TRACE)) {
            log(SimpleLog.LOG_LEVEL_TRACE, message, t);
        }
    }
506031
public void deliver(final byte[] message) {
    synchronized (this.heartBeatManager) {
      if (this.currentStatus.isNotRunning()) {
        LOG.log(Level.WARNING,
            "Trying to send a message to a task that is in state: {0}. Ignoring.",
            this.currentStatus.getState());
      } else {
        try {
          this.deliverMessageToTask(message);
        } catch (final TaskMessageHandlerFailure taskMessageHandlerFailure) {
          LOG.log(Level.WARNING, "Exception while executing task close handler.",
              taskMessageHandlerFailure.getCause());
          this.currentStatus.setException(taskMessageHandlerFailure.getCause());
        }
      }
    }
  }
784582
public static void printFatal(Object caller, Object message)
	{
		
		StringBuilder text = new StringBuilder();

		Class<?> c = callerBuilder(caller, text);

		if(message instanceof Throwable)
			getLog(c).fatal(text.append(stackTrace((Throwable)message)));
		else
			getLog(c).fatal(text.append(message));

	}
631432
@Override
    public void trace(String msg, Throwable t) {
        logger.log(FQCN, traceCapable ? Level.TRACE : Level.DEBUG, msg, t);
    }
742295
public String execute(String clientID, String name, long time, Level level,
	        Object message, Throwable throwable){
		return Thread.currentThread().getName();
	}
645786
public void trace(Object message, Throwable exception) {
    log(Level.TRACE, message, exception);
  }
689240
public void debug(Object message, Throwable t)
    {
        if (IS12)
        {
            getLogger().log(FQCN, Level.DEBUG, message, t);
        }
        else
        {
            getLogger().log(FQCN, Level.DEBUG, message, t);
        }
    }
312086
public void trace(Object message, Throwable t)
    {
        getLogger().trace(message.toString(), t);
    }
202489
public static InsnList throwRuntimeException(String message) {
        Validate.notNull(message);

        InsnList ret = new InsnList();

        ret.add(new TypeInsnNode(Opcodes.NEW, "java/lang/RuntimeException"));
        ret.add(new InsnNode(Opcodes.DUP));
        ret.add(new LdcInsnNode(message));
        ret.add(new MethodInsnNode(Opcodes.INVOKESPECIAL, "java/lang/RuntimeException", "<init>", "(Ljava/lang/String;)V", false));
        ret.add(new InsnNode(Opcodes.ATHROW));

        return ret;
    }
1161952
function(logLevel, message, exception) {
		var loggingEvent = new Log4js.LoggingEvent(this.category, logLevel, 
			message, exception, this);
		this.loggingEvents.push(loggingEvent);
		this.onlog.dispatch(loggingEvent);
	}
1168245
@Override
    protected void afterExecute(Runnable r, Throwable t) {
        super.afterExecute(r, t);
        if (t == null && r instanceof Future<?>) {
            try {
                ((Future<?>) r).get();
            } catch (CancellationException ce) {
                t = ce;
            } catch (ExecutionException ee) {
                t = ee.getCause();
            } catch (InterruptedException ie) {
                Thread.currentThread().interrupt(); // ignore/reset
            }
        }
        if (t != null) {
            ARouter.logger.warning(Consts.TAG, "Running task appeared exception! Thread [" + Thread.currentThread().getName() + "], because [" + t.getMessage() + "]\n" + TextUtils.formatStackTrace(t.getStackTrace()));
        }
    }
300820
public int handleMessage(BaseMessage message)
    {
        String strClassName = this.getMessageProcessorClassName(message);
        if ((strClassName == null) || (strClassName.length() == 0))
            return this.handleOtherMessage(message);
        message.consume();      // I'll be handling this one.
        String strParams = Utility.addURLParam(null, DBParams.PROCESS, strClassName);
        App application = m_application;
        if (message.getProcessedByClientSession() instanceof RemoteTask)
            if (message.getProcessedByClientSession() instanceof Task)  // Always
                application = ((Task)message.getProcessedByClientSession()).getApplication();    // If I have the task session, run this task under the same app
        MessageProcessRunnerTask task = new MessageProcessRunnerTask(application, strParams, null);
        task.setMessage(message);
        m_application.getTaskScheduler().addTask(task);
        return DBConstants.NORMAL_RETURN;   // No need to call super.
    }
731677
public void warn(Object message, Throwable exception) {
    log(Level.WARN, message, exception);
  }
865573
public static void call(Runnable task) {
        try {
            call(() -> {
                task.run();
                return true;
            });
        } catch (Exception e) {
            // It's safe to throw unsafely here because the Callable we passed never throws a checked exception.
            Exceptions.throwUnsafely(e);
        }
    }
1214900
public static EvaluatorException reportRuntimeError(String message)
    {
        int[] linep = { 0 };
        String filename = getSourcePositionFromStack(linep);
        return Context.reportRuntimeError(message, filename, linep[0], null, 0);
    }
765689
public void warn(String msg, Throwable t)
	{
		log(LogLevel.WARN, msg, t);
	}