public void log() { if (WebConfiguration.LOGGER.isLoggable(loggingLevel)) { DeprecationLoggingStrategy strategy = parameter.getDeprecationLoggingStrategy(); if (strategy != null && strategy.shouldBeLogged(WebConfiguration.this)) { WebConfiguration.LOGGER.log(loggingLevel, logKey, params); } } }
/** * Process all non-boolean context initialization parameters. * * @param servletContext the ServletContext of interest * @param contextName the context name */ private void processInitParameters(ServletContext servletContext, String contextName) { for (WebContextInitParameter param : WebContextInitParameter.values()) { String value = servletContext.getInitParameter(param.getQualifiedName()); if (value != null && value.length() > 0 && param.isDeprecated()) { WebContextInitParameter alternate = param.getAlternate(); DeprecationLoggingStrategy strategy = param.getDeprecationLoggingStrategy(); if (strategy == null || strategy.shouldBeLogged(this)) { if (LOGGER.isLoggable(Level.WARNING)) { if (alternate != null) { queueLoggingAction( new DeferredParameterLoggingAction( param, Level.WARNING, "jsf.config.webconfig.param.deprecated", new Object[] { contextName, param.getQualifiedName(), alternate.getQualifiedName() })); } else { queueLoggingAction( new DeferredParameterLoggingAction( param, Level.WARNING, "jsf.config.webconfig.param.deprecated.no_replacement", new Object[] {contextName, param.getQualifiedName()})); } } } if (alternate != null) { queueLoggingAction( new DeferredParameterLoggingAction( param, Level.INFO, "jsf.config.webconfig.configinfo.reset", new Object[] {contextName, alternate.getQualifiedName(), value})); contextParameters.put(alternate, value); } continue; } if ((value == null || value.length() == 0) && !param.isDeprecated()) { value = param.getDefaultValue(); } if (value == null || value.length() == 0) { continue; } if (value.length() > 0) { if (LOGGER.isLoggable(loggingLevel)) { LOGGER.log( loggingLevel, "jsf.config.webconfig.configinfo", new Object[] {contextName, param.getQualifiedName(), value}); } contextParameters.put(param, value); } else { if (LOGGER.isLoggable(loggingLevel)) { LOGGER.log( loggingLevel, "jsf.config.webconfig.option.notconfigured", new Object[] {contextName, param.getQualifiedName()}); } } } }