Check whether the Log4j Logger used is enabled for <code>WARN</code>
priority.
425159
public boolean isWarnEnabled()
    {
        if (IS12)
        {
            return getLogger().isEnabledFor(Level.WARN);
        }
        return getLogger().isEnabledFor(Level.WARN);
    }
1077052
public void warn(Object message, Throwable t) {
        differentiatedLog(null, CATEGORY_FQCN, LocationAwareLogger.WARN_INT, message, t);
    }
402140
public void log(Priority priority, Object message, Throwable t) {
        if (repository.isDisabled(priority.level)) {
            return;
        }
        if (priority.isGreaterOrEqual(this.getEffectiveLevel()))
            forcedLog(FQCN, priority, message, t);
    }
756269
public static void warnWithException(Logger logger, String message, Object ...args) {
    if (logger.isDebugEnabled()) {
      logger.debug(message, args);
    } else {
      if (args.length > 0 && args[args.length - 1] instanceof Throwable) {
        args[args.length - 1] = ((Throwable) args[args.length - 1]).getMessage();
      }
      logger.warn(message + ": {}", args);
    }
  }
367156
@Override
	public boolean willLog(Level level) {
		switch(level) {
			case DEBUG:
				return slf4j.isDebugEnabled();
			case ERROR:
				return slf4j.isErrorEnabled();
			case WARN:
				return slf4j.isWarnEnabled();
//			case INFO:
//			case INIT:
//			case AUDIT:
			default:
				return slf4j.isInfoEnabled();
		}
	}
451231
public void warn(Object message, Throwable t)
    {
        getLogger().warn(message.toString(), t);
    }
49120
private boolean detectLogFromBugsnag(Throwable throwable) {
        // Check all places that LOGGER is called with an exception in the Bugsnag library
        for (StackTraceElement element : throwable.getStackTrace()) {
            for (String excludedClass : EXCLUDED_CLASSES) {
                if (element.getClassName().startsWith(excludedClass)) {
                    return true;
                }
            }
        }

        return false;
    }
479853
public void l7dlog(Priority priority, String key, Throwable t) {
        if (repository.isDisabled(priority.level)) {
            return;
        }
        if (priority.isGreaterOrEqual(this.getEffectiveLevel())) {
            String msg = getResourceBundleString(key);
            // if message corresponding to 'key' could not be found in the
            // resource bundle, then default to 'key'.
            if (msg == null) {
                msg = key;
            }
            forcedLog(FQCN, priority, msg, t);
        }
    }
1345196
@Transactional
	protected synchronized void _checkAlertExistence(boolean enabled) {
		for (String alertName : new String[] { FILE_DESCRIPTORS_ALERT, PHYSICAL_MEMORY_ALERT, SWAP_SPACE_ALERT }) {
			if (_alertService.findAlertByNameAndOwner(_constructAlertName(alertName), _adminUser) == null) {
				String metricExpression = null;
				TriggerType triggerType = null;
				String triggerName = null;
				double triggerThreshold = Double.NaN;

				switch (alertName) {
				case FILE_DESCRIPTORS_ALERT:

					String openFileDescMetricExp = MessageFormat.format("-1h:{0}:{1}'{'host={2}'}':avg", Counter.OPEN_DESCRIPTORS.getScope(),
							Counter.OPEN_DESCRIPTORS.getMetric(), HOSTNAME);
					String maxFileDescMetricExp = MessageFormat.format("-1h:{0}:{1}'{'host={2}'}':avg", Counter.MAX_DESCRIPTORS.getScope(),
							Counter.MAX_DESCRIPTORS.getMetric(), HOSTNAME);

					metricExpression = MessageFormat.format("{0}({1}, {2})", Function.DIVIDE.getName(), openFileDescMetricExp,
							maxFileDescMetricExp);
					triggerType = TriggerType.GREATER_THAN;
					triggerName = "Open FD > 95% of Max FD";
					triggerThreshold = 0.95;
					break;
				case PHYSICAL_MEMORY_ALERT:

					String freeMemMetricExp = MessageFormat.format("-1h:{0}:{1}'{'host={2}'}':avg", Counter.FREE_PHYSICAL_MEM.getScope(),
							Counter.FREE_PHYSICAL_MEM.getMetric(), HOSTNAME);
					String maxMemMetricExp = MessageFormat.format("-1h:{0}:{1}'{'host={2}'}':avg", Counter.MAX_PHYSICAL_MEM.getScope(),
							Counter.MAX_PHYSICAL_MEM.getMetric(), HOSTNAME);

					metricExpression = MessageFormat.format("{0}({1}, {2})", Function.DIVIDE.getName(), freeMemMetricExp, maxMemMetricExp);
					triggerType = TriggerType.LESS_THAN;
					triggerName = "Free Mem < 5% of Tot Mem";
					triggerThreshold = 0.05;
					break;
				case SWAP_SPACE_ALERT:

					String freeSSMetricExp = MessageFormat.format("-1h:{0}:{1}'{'host={2}'}':avg", Counter.FREE_SWAP_SPACE.getScope(),
							Counter.FREE_SWAP_SPACE.getMetric(), HOSTNAME);
					String maxSSMetricExp = MessageFormat.format("-1h:{0}:{1}'{'host={2}'}':avg", Counter.MAX_SWAP_SPACE.getScope(),
							Counter.MAX_SWAP_SPACE.getMetric(), HOSTNAME);

					metricExpression = MessageFormat.format("{0}({1}, {2})", Function.DIVIDE.getName(), freeSSMetricExp, maxSSMetricExp);
					triggerType = TriggerType.LESS_THAN;
					triggerName = "Free Swap Space < 5% of Tot Swap Space";
					triggerThreshold = 0.05;
					break;
				default:
					throw new SystemException("Attempting to create an unsupported monitoring alert" + alertName);
				}
				requireArgument(metricExpression != null && triggerType != null & triggerName != null, "Unsupported monitor alert " + alertName);

				Alert alert = new Alert(_adminUser, _adminUser, _constructAlertName(alertName), metricExpression, "0 * * * *");
				Notification notification = new Notification(NOTIFICATION_NAME, alert, AuditNotifier.class.getName(), new ArrayList<String>(),
						60000L);
				Trigger trigger = new Trigger(alert, triggerType, triggerName, triggerThreshold, 0);
				List<Trigger> triggers = Arrays.asList(new Trigger[] { trigger });

				notification.setTriggers(triggers);
				alert.setNotifications(Arrays.asList(new Notification[] { notification }));
				alert.setTriggers(triggers);
				alert.setEnabled(enabled);
				_alertService.updateAlert(alert);
			} else { // end if

				Alert alert = _alertService.findAlertByNameAndOwner(_constructAlertName(alertName), _adminUser);

				alert.setEnabled(enabled);
				_alertService.updateAlert(alert);
			} // end if-else
		} // end for
	}
888039
private boolean checkEnabled() {
        /* Enable this analyzer ONLY if the Nexus URL has been set to something
         other than the default one (if it's the default one, we'll use the
         central one) and it's enabled by the user.
         */
        boolean retval = false;
        try {
            if (!DEFAULT_URL.equals(getSettings().getString(Settings.KEYS.ANALYZER_NEXUS_URL))
                    && getSettings().getBoolean(Settings.KEYS.ANALYZER_NEXUS_ENABLED)) {
                LOGGER.info("Enabling Nexus analyzer");
                retval = true;
            } else {
                LOGGER.debug("Nexus analyzer disabled, using Central instead");
            }
        } catch (InvalidSettingException ise) {
            LOGGER.warn("Invalid setting. Disabling Nexus analyzer");
        }

        return retval;
    }
104885
private boolean checkEnabled() {
        try {
            return getSettings().getBoolean(Settings.KEYS.ANALYZER_ARTIFACTORY_ENABLED);
        } catch (InvalidSettingException ise) {
            LOGGER.warn("Invalid setting. Disabling the Artifactory analyzer");
        }
        return false;
    }
959001
def loggable(obj):
    
    if isinstance(obj, logging.Logger):
        return True
    else:
        return (inspect.isclass(obj)
                and inspect.ismethod(getattr(obj, 'debug', None))
                and inspect.ismethod(getattr(obj, 'isEnabledFor', None))
                and inspect.ismethod(getattr(obj, 'setLevel', None)))
148878
public void warn(Object message) {
        differentiatedLog(null, CATEGORY_FQCN, LocationAwareLogger.WARN_INT, message, null);
    }
1326377
private <T extends Rdp4jListener> void notifyListeners(Class<T> listenerType, Notifier<T> notifier)
            throws InterruptedException {
        for (Rdp4jListener listener : listeners) {
            if (isInstanceOf(listener, listenerType)) {
                /*
                 * This cast is correct, since we check if listener
                 * is instance of listenerType.
                 */
                @SuppressWarnings("unchecked")
                T listener2 = (T) listener;
                try {
                    notifier.notify(listener2);
                } catch (InterruptedException e) {
                    throw e;
                } catch (Throwable e) {
                    logErrorMessage(e);
                }
            }
        }
    }
419409
protected void forcedLog(final String fqcn, final Priority level, final Object message, final Throwable t) {
		provider.log(fqcn, null, translatePriority(level), t, message == t ? null : message, (Object[]) null);
	}
644809
public void warn(String loggerFqcn, Object message, Throwable t) {
        doLog(Level.WARN, loggerFqcn, message, null, t);
    }
496855
public static void logBeforeExit(ExitLogger logger) {
        try {
            if (logged.compareAndSet(false, true)) {
                logger.logExit();
            }
        } catch (Throwable ignored){
            // ignored
        }
    }