private void notifyDeveloper(String message, String... parameters) { if (devMode) { LOG.warn(message, parameters); } else { if (LOG.isDebugEnabled()) { LOG.debug(message, parameters); } } }
public void setMaxExpression(String maxExpression) { if (LOG.isDebugEnabled()) { LOG.debug("${maxExpression} was defined as [#0]", maxExpression); } this.maxExpression = maxExpression; }
/** * Log a failed lookup, being more verbose when devMode=true. * * @param expr The failed expression * @param e The thrown exception. */ private void logLookupFailure(String expr, Exception e) { String msg = LoggerUtils.format("Caught an exception while evaluating expression '#0' against value stack", expr); if (devMode && LOG.isWarnEnabled()) { LOG.warn(msg, e); LOG.warn("NOTE: Previous warning message was issued due to devMode set to true."); } else if (LOG.isDebugEnabled()) { LOG.debug(msg, e); } }
public void addActionError(String anErrorMessage) { log.error("Validation error: " + anErrorMessage); }
private void closeQuietly(InputStream is) { try { if (is != null) is.close(); } catch (IOException e) { if (LOG.isErrorEnabled()) LOG.error("Unable to close file input stream", e); } }
public void reload() { if (LOG.isTraceEnabled()) LOG.trace("Reloading class loader"); delegate = new ResourceStoreClassLoader(parent, stores); }
public void addActionMessage(String aMessage) { log.info("Validation Message: " + aMessage); }
public static Logger getLogger(Class<?> cls) { return getLoggerFactory().getLoggerImpl(cls); }
public LoggingValidationAware(Class clazz) { log = LoggerFactory.getLogger(clazz); }
public void setLoggerFactory(LoggerFactory factory) { LoggerFactory.setLoggerFactory(factory); }
@Override public void fatalError(SAXParseException exception) throws SAXException { LOG.fatal(exception.getMessage() + " at (" + exception.getPublicId() + ":" + exception.getLineNumber() + ":" + exception.getColumnNumber() + ")", exception); throw exception; } }
public Object nullMethodResult(Map<String, Object> context, Object target, String methodName, Object[] args) { if (LOG.isDebugEnabled()) { LOG.debug("Entering nullMethodResult "); } return null; }
public void addFieldError(String fieldName, String errorMessage) { log.error("Validation error for " + fieldName + ":" + errorMessage); }
public static Logger getLogger(String name) { return getLoggerFactory().getLoggerImpl(name); }
public void setMinExpression(String minExpression) { if (LOG.isDebugEnabled()) { LOG.debug("${minExpression} was defined as [#0]", minExpression); } this.minExpression = minExpression; }
@Override public void error(SAXParseException exception) throws SAXException { LOG.error(exception.getMessage() + " at (" + exception.getPublicId() + ":" + exception.getLineNumber() + ":" + exception.getColumnNumber() + ")", exception); throw exception; }
public I18nInterceptor() { if (LOG.isDebugEnabled()) { LOG.debug("new I18nInterceptor()"); } }
protected Locale readStoredLocalFromSession(ActionInvocation invocation, Map<String, Object> session) { // check session for saved locale Object sessionLocale = session.get(attributeName); if (sessionLocale != null && sessionLocale instanceof Locale) { Locale locale = (Locale) sessionLocale; if (LOG.isDebugEnabled()) { LOG.debug("applied session locale=#0", locale); } return locale; } return null; }
public Locale getLocale() { ActionContext ctx = ActionContext.getContext(); if (ctx != null) { return ctx.getLocale(); } else { if (LOG.isDebugEnabled()) { LOG.debug("Action context not initialized"); } return null; } }
public Locale getLocale() { ActionContext ctx = ActionContext.getContext(); if (ctx != null) { return ctx.getLocale(); } else { if (LOG.isDebugEnabled()) { LOG.debug("Action context not initialized"); } return null; } }