Generically log something

@param aLogger
Logger to use. May not be <code>null</code>.
@param aErrorLevelProvider
Error level provider to use. May not be <code>null</code>.
@param sMsg
The message to log. May not be <code>null</code>.
978655
public static void log (@Nonnull final Logger aLogger,
                          @Nonnull final IHasErrorLevel aErrorLevelProvider,
                          @Nonnull final String sMsg)
  {
    log (aLogger, aErrorLevelProvider.getErrorLevel (), sMsg, null);
  }
1290620
private static LoggingProvider loadLoggingProvider() {
		ServiceLoader<LoggingProvider> loader = new ServiceLoader<LoggingProvider>(LoggingProvider.class);
		String name = Configuration.get(PROVIDER_PROPERTY);

		if (name == null) {
			Collection<LoggingProvider> providers = loader.createAll();
			switch (providers.size()) {
				case 0:
					InternalLogger.log(Level.WARN, "No logging framework implementation found in classpath."
						+ " Add tinylog-impl.jar for outputting log entries.");
					return new NopLoggingProvider();
				case 1:
					return providers.iterator().next();
				default:
					return new BundleLoggingProvider(providers);
			}
		} else if (NOP_PROVIDER_NAME.equalsIgnoreCase(name)) {
			return new NopLoggingProvider();
		} else {
			LoggingProvider provider = loader.create(name);
			if (provider == null) {
				InternalLogger.log(Level.ERROR, "Requested logging provider is not available. Logging will be disabled.");
				return new NopLoggingProvider();
			} else {
				return provider;
			}
		}
	}
471951
@Override
	public void log(Level level, String msg) {
		
		super.log(level, maskPassword(msg));
	}
551393
private void log(@NonNull Logger log, @NonNull ComapiResult r, String msg) {
        if (!r.isSuccessful()) {
            log.e(msg + ". Error calling services" + " (" + r.getCode() + "). " + r.getMessage() + ". " + r.getErrorBody());
        }
    }
107718
public static function log($msg, $logLevel = X_LOG_DEBUG) {
        /** @var Logger $logger */
        $logger = ComponentFactory::getComponent('logger');
        $logger->log($msg, $logLevel, 2);
    }
563121
def log_error(cls, msg):
        
        cls.error_logger.error(msg)
        cls.debug_logger.debug(msg)
1367052
public void warn(final String msg) {
        if (proxy.isWarnEnabled()) {
            if (proxy instanceof LocationAwareLogger) {
                ((LocationAwareLogger) proxy).log(null, FQCN, LocationAwareLogger.WARN_INT, msg, null, null);
            } else {
                proxy.warn(msg);
            }
        }
    }
812474
public static void logDevFailed(final DevFailed e, final Logger logger) {
        if (e.errors != null) {
            for (int i = 0; i < e.errors.length; i++) {
                logger.error("Error Level {} :", i);
                logger.error("\t - desc: {}", e.errors[i].desc);
                logger.error("\t - origin: {}", e.errors[i].origin);
                logger.error("\t - reason: {}", e.errors[i].reason);
                String sev = "";
                if (e.errors[i].severity.value() == ErrSeverity.ERR.value()) {
                    sev = "ERROR";
                } else if (e.errors[i].severity.value() == ErrSeverity.PANIC.value()) {
                    sev = "PANIC";
                } else if (e.errors[i].severity.value() == ErrSeverity.WARN.value()) {
                    sev = "WARN";
                }
                logger.error("\t - severity: {}", sev);
            }
        } else {
            logger.error("EMPTY DevFailed");
        }
    }
540528
public void d(final String msg) {
        logMgr.log(tag, LogLevelConst.DEBUG, msg, null);
    }
852808
public void info(final String msg) {
        if (proxy.isInfoEnabled()) {
            if (proxy instanceof LocationAwareLogger) {
                ((LocationAwareLogger) proxy).log(null, FQCN, LocationAwareLogger.INFO_INT, msg, null, null);
            } else {
                proxy.info(msg);
            }
        }
    }
915818
public void add_logging_target (Logger logger, String ttype, String tname) throws DevFailed
	{
    add_logging_target(logger, ttype + LOGGING_SEPARATOR + tname);
	}
641514
@Override
    public void log(Level level, String msg) {
        if (isLoggable(level)) {
            LogRecord logRecord = createLogRecord(level, msg, null, null, null, null, null);
            log(logRecord);
        }
    }
217330
void log(SessionLogEntry entry, String formattedMessage) {
        int level = entry.getLevel();
        Throwable loggedException = entry.getException();

        String msgParm;
        if ((formattedMessage == null || formattedMessage.equals("")) && loggedException != null) {
            msgParm = loggedException.toString();
        } else {
            msgParm = "[" + this.channel + "] " + formattedMessage;
        }

        switch (level) {
            case 8:
                return;
            case 7: // SEVERE
                Tr.error(_tc, "PROVIDER_ERROR_CWWJP9992E", msgParm);
                break;
            case 6:// WARN
                Tr.warning(_tc, "PROVIDER_WARNING_CWWJP9991W", msgParm);
                break;
            case 5: // INFO
                Tr.info(_tc, "PROVIDER_INFO_CWWJP9990I", msgParm);
                break;
            case 4: // CONFIG
                // I'm not sure what to do with this level... just do (log) it.
                Tr.info(_tc, "PROVIDER_INFO_CWWJP9990I", msgParm);
                break;
            case 3: // FINE
            case 2: // FINER
            case 1: // FINEST
            case 0: // TRACE
                Tr.debug(_tc, formattedMessage);
                break;
        }// end switch

        // if there is an exception - only log it to trace
        if (_tc.isDebugEnabled() && loggedException != null) {
            Tr.debug(_tc, "throwable", loggedException);
        }
    }
801316
public void error(Marker marker, String msg) {
        if (!logger.isErrorEnabled(marker))
            return;
        if (instanceofLAL) {
            ((LocationAwareLogger) logger).log(marker, fqcn, LocationAwareLogger.ERROR_INT, msg, null, null);
        } else {
            logger.error(marker, msg);
        }
    }
355309
@FFDCIgnore(Exception.class)
    private void logProviderInfo(String providerName, ClassLoader loader) {
        try {
            if (PROVIDER_ECLIPSELINK.equals(providerName)) {
                // org.eclipse.persistence.Version.getVersion(): 2.6.4.v20160829-44060b6
                Class<?> Version = loadClass(loader, "org.eclipse.persistence.Version");
                String version = (String) Version.getMethod("getVersionString").invoke(Version.newInstance());
                Tr.info(tc, "JPA_THIRD_PARTY_PROV_INFO_CWWJP0053I", "EclipseLink", version);
            } else if (PROVIDER_HIBERNATE.equals(providerName)) {
                // org.hibernate.Version.getVersionString(): 5.2.6.Final
                Class<?> Version = loadClass(loader, "org.hibernate.Version");
                String version = (String) Version.getMethod("getVersionString").invoke(null);
                Tr.info(tc, "JPA_THIRD_PARTY_PROV_INFO_CWWJP0053I", "Hibernate", version);
            } else if (PROVIDER_OPENJPA.equals(providerName)) {
                // OpenJPAVersion.appendOpenJPABanner(sb): OpenJPA #.#.#\n version id: openjpa-#.#.#-r# \n Apache svn revision: #
                StringBuilder version = new StringBuilder();
                Class<?> OpenJPAVersion = loadClass(loader, "org.apache.openjpa.conf.OpenJPAVersion");
                OpenJPAVersion.getMethod("appendOpenJPABanner", StringBuilder.class).invoke(OpenJPAVersion.newInstance(), version);
                Tr.info(tc, "JPA_THIRD_PARTY_PROV_INFO_CWWJP0053I", "OpenJPA", version);
            } else {
                Tr.info(tc, "JPA_THIRD_PARTY_PROV_NAME_CWWJP0052I", providerName);
            }
        } catch (Exception x) {
            Tr.info(tc, "JPA_THIRD_PARTY_PROV_NAME_CWWJP0052I", providerName);
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                Tr.debug(this, tc, "unable to determine provider info", x);
        }
    }
733973
public void log(Level level, String msg) {
		logIfEnabled(level, null, msg, UNKNOWN_ARG, UNKNOWN_ARG, UNKNOWN_ARG, null);
	}
1350784
private void logMandatoryWarning(DiagnosticPosition pos, String msg,
                                     Object... args) {
        // Note: the following log methods are safe if lintCategory is null.
        if (enforceMandatory)
            log.mandatoryWarning(lintCategory, pos, msg, args);
        else
            log.warning(lintCategory, pos, msg, args);
    }