function log(iLevel, sMessage, vDetails, sComponent, fnSupportInfo) {
		if (!fnSupportInfo && !sComponent && typeof vDetails === "function") {
			fnSupportInfo = vDetails;
			vDetails = "";
		}
		if (!fnSupportInfo && typeof sComponent === "function") {
			fnSupportInfo = sComponent;
			sComponent = "";
		}

		if (iLevel <= level(sComponent) ) {
			var fNow =  now(),
				oNow = new Date(fNow),
				iMicroSeconds = Math.floor((fNow - Math.floor(fNow)) * 1000),
				oLogEntry = {
					time     : pad0(oNow.getHours(),2) + ":" + pad0(oNow.getMinutes(),2) + ":" + pad0(oNow.getSeconds(),2) + "." + pad0(oNow.getMilliseconds(),3) + pad0(iMicroSeconds,3),
					date     : pad0(oNow.getFullYear(),4) + "-" + pad0(oNow.getMonth() + 1,2) + "-" + pad0(oNow.getDate(),2),
					timestamp: fNow,
					level    : iLevel,
					message  : String(sMessage || ""),
					details  : String(vDetails || ""),
					component: String(sComponent || "")
				};
			if (bLogSupportInfo && typeof fnSupportInfo === "function") {
				oLogEntry.supportInfo = fnSupportInfo();
			}

			if (iLogEntriesLimit) {
				if (aLog.length >= iLogEntriesLimit) {
					// Cap the amount of stored log messages by 30 percent
					discardLogEntries();
				}

				aLog.push(oLogEntry);
			}

			if (oListener) {
				oListener.onLogEntry(oLogEntry);
			}

			/*
			 * Console Log, also tries to log to the console, if available.
			 *
			 * Unfortunately, the support for console is quite different between the UI5 browsers. The most important differences are:
			 * - in FF3.6 the console is not available, until FireBug is opened. It disappears again, when fire bug is closed.
			 *   But when the settings for a web site are stored (convenience), the console remains open
			 *   When the console is available, it supports all relevant methods
			 * - in FF9.0, the console is always available, but method assert is only available when firebug is open
			 * - in Webkit browsers, the console object is always available and has all required methods
			 *   - Exception: in the iOS Simulator, console.info() does not exist
			 */
			/*eslint-disable no-console */
			if (console) { // in Firefox, console might not exist or it might even disappear
				var isDetailsError = vDetails instanceof Error,
					logText = oLogEntry.date + " " + oLogEntry.time + " " + oLogEntry.message + " - " + oLogEntry.details + " " + oLogEntry.component;
				switch (iLevel) {
					case Log.Level.FATAL:
					case Log.Level.ERROR: isDetailsError ? console.error(logText, "\n", vDetails) : console.error(logText); break;
					case Log.Level.WARNING: isDetailsError ? console.warn(logText, "\n", vDetails) : console.warn(logText); break;
					case Log.Level.INFO:
						if (console.info) { // info not available in iOS simulator
							isDetailsError ? console.info(logText, "\n", vDetails) : console.info(logText);
						} else {
							isDetailsError ? console.log(logText, "\n", vDetails) : console.log(logText);
						}
						break;
					case Log.Level.DEBUG:
						isDetailsError ? console.debug(logText, "\n", vDetails) : console.debug(logText);
						break;
					case Log.Level.TRACE:
						isDetailsError ? console.trace(logText, "\n", vDetails) : console.trace(logText);
						break;
				}
				if (console.info && oLogEntry.supportInfo) {
					console.info(oLogEntry.supportInfo);
				}
			}
			/*eslint-enable no-console */
			return oLogEntry;
		}
	}
Creates a new log entry depending on its level and component.

If the given level is higher than the max level for the given component
(or higher than the global level, if no component is given),
then no entry is created and <code>undefined</code> is returned.

If an <code>Error</code> is passed via <code>vDetails</code> the stack
of the <code>Error</code> will be logged as a separate parameter in
the proper <code>console</code> function for the matching log level.

@param {module:sap/base/Log.Level} iLevel
  One of the log levels FATAL, ERROR, WARNING, INFO, DEBUG, TRACE
@param {string} sMessage
  The message to be logged
@param {string|Error} [vDetails]
  The optional details for the message; could be an Error which will be logged with the
  stacktrace, to easily find the root cause of the Error
@param {string} [sComponent]
  The log component under which the message should be logged
@param {function} [fnSupportInfo] Callback that returns an additional support object to be
  logged in support mode. This function is only called if support info mode is turned on via
  the Support Assistant. To avoid negative effects regarding execution times and
  memory consumption, the returned object should be a simple immutable JSON object with mostly
  static and stable content.
@returns {module:sap/base/Log.Entry}
  The log entry as an object or <code>undefined</code> if no entry was created
@private