This method is used by the FrameworkHandler to log framework events.

@param bundle    The bundle that caused the event.
@param level     The level to be logged as.
@param message   The message.
@param exception The exception, if any otherwise null.
352708
void log( @Nullable Bundle bundle, int level, String message, @Nullable Throwable exception )
    {
        logImpl( bundle, level, message, exception, m_fqcn );
    }
895399
public void run(T configuration, Environment environment) throws Exception {
        for (ConfiguredBundle<? super T> bundle : configuredBundles) {
            bundle.run(configuration, environment);
        }
    }
1087970
public void logWarning(String message, Exception exception) {
        if (!(logWarning || globalLog.logWarning))
            return;

        if (warningLog != null)
            log(warningLog, "WARNING", owner, message, exception);
        else 
            log(globalLog.warningLog, "WARNING", owner, message, exception);
    }
727094
public static void queueMessage(final String level, final String message) {
		try {
			LogAppender<LogEvent> appender = LogManager.getAppender();

			if (appender != null) {
				LogEvent.Builder builder = LogEvent.newBuilder();
				builder.level(level);
				builder.message(message);
				
				if ((level != null) && ("ERROR".equals(level.toUpperCase()))) {
					StackTraceElement[] stackTrace = new Throwable().getStackTrace();

					if ((stackTrace != null) && (1 < stackTrace.length)) {
						StackTraceElement caller = stackTrace[1];
						builder.className(caller.getClassName());
						builder.methodName(caller.getMethodName());
						builder.lineNumber(caller.getLineNumber());						
					}
				}
				
				appender.append(builder.build());
			}
		} catch (Throwable t) {
			LOGGER.info("Unable to queue message to Stackify Log API service: {} {}", level, message, t);
		}
	}
341300
public void log(java.util.logging.Level level, CharSequence message) {
    LogRecord rec = new ELKILogRecord(level, message);
    logger.log(rec);
  }
573367
void handleStop(Bundle bundle) {
        if (bundle == null) {
            throw new IllegalArgumentException("Method argument bundle must not be null.");
        }

        this.logger.info("Removing infrastructure for bundle: " + bundle + "...");
            this.modelRegistrar.unregister(bundle);
            this.dispatcherServlet.disableMvc(bundle);

        this.logger.info("Infrastructure for {} removed.", bundle);
    }
1325047
public void log(String message, Level level) {
    log(null, null, message, level);
  }
807586
public void log(final String tag, final int logLevel, final String msg, final Throwable exception) {
        if (aConsole != null) {
            aConsole.appendLog(tag, logLevel, msg, exception);
        }
        if (aFile != null) {
            aFile.appendLog(tag, logLevel, msg, exception);
        }
    }
242905
public void trace(Object message, Throwable exception) {
        log(Level.FINEST, String.valueOf(message), exception);
    }
747936
public synchronized void logMessage(final Level level, final String message)
	{

		if (logLevel.toInt() > level.toInt()) {
			return;
		}

		try {
			this.writer.write(System.currentTimeMillis() + "\t" + consumerName
					+ " [" + type.toString() + "] " + "\t" + message + "\r\n");
			this.writer.flush();
		}
		catch (IOException ioe) {
			ioe.printStackTrace();
		}
	}
1064831
public final void errorDebug(final Throwable cause, final String message)
    {
        logDebug(Level.ERROR, cause, message);
    }
690594
public void setLoggerLevel(@Nonnull String loggerName, @Nullable String level) {
        logger.info("setLoggerLevel(" + loggerName + "," + level + ")");
        try {
            Level levelAsObject = Level.toLevel(level);
            LogManager.getLogger(loggerName).setLevel(levelAsObject);
        } catch (RuntimeException e) {
            logger.warn("Exception setting logger " + loggerName + " to level " + level, e);
            throw e;
        }
    }
928822
void log(Level level, String msg) {
        if (msg != null && !msg.isEmpty())
            logger.log(level, msg);
    }
6057
public void log (int level, String message, Throwable t)
    {
        if (isLevelEnabled(level)) {
            _sctx.log(message, t);
        }
    }
617489
public final void error(Object message, Throwable t) {
        if (isLevelEnabled(LOG_LEVEL_ERROR)) {
            log(LOG_LEVEL_ERROR, message, t);
        }
    }
649622
public void log (int level, String moduleName, String message)
    {
        getLogger(moduleName).log(getLevel(level), message);
    }
83016
public void logError(Object[] message,Throwable throwable)
    {
        this.log(LogLevel.ERROR,message,throwable);
    }