APISonar


org.slf4j.spi.LocationAwareLogger.log

> org > slf4j > spi > LocationAwareLogger > log
org APIs slf4j APIs spi APIs LocationAwareLogger APIs log APIs

Example 1
protected void log(org.slf4j.Logger log, String text) {
        if (log.isInfoEnabled()) {
            final String message = logPrefix != null ? (logPrefix + text) : text;
            if (log instanceof LocationAwareLogger) {
                final LocationAwareLogger la = (LocationAwareLogger) log;
                la.log(null, callerFQCN, LocationAwareLogger.INFO_INT, message, null, null);
            } else {
                log.info(message);
            }
        }
    }
Example 2
LocationAwareLogger logger;

	public void trace(Object message, Throwable t) {
		if (this.isTraceEnabled())
			logger.log(null, SELF_FQCN, LocationAwareLogger.TRACE_INT, (String) message, EMTRY , t);
	}
Example 3
private final LocationAwareLogger lALogger;

    protected void internalDebug(String msg, Throwable cause) {
        if (lALogger != null) {
            lALogger.log(null, FQCN, LocationAwareLogger.DEBUG_INT, msg, null, cause);
        } else {
            logger.debug(msg);
        }
    }
Example 4
private final LocationAwareLogger locationAwareLogger;

    public void warn(String msg) {
        if (locationAwareLogger != null) {
            locationAwareLogger.log(null, FQCN, LocationAwareLogger.WARN_INT, msg, null, null);
            return;
        }
        logger.warn(msg);
    }