WW-4453 Reduces level to WARN

This commit is contained in:
Lukasz Lenart
2016-10-10 11:02:27 +02:00
parent 1bd9bde610
commit dbf2bcb5cd
@@ -23,6 +23,7 @@ package org.apache.struts2.components;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.TextProvider;
import com.opensymphony.xwork2.util.LocalizedTextUtil;
import com.opensymphony.xwork2.util.ValueStack;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@@ -291,8 +292,17 @@ public class Date extends ContextBean {
date = ((Calendar) dateObject).getTime();
} else {
if (devMode) {
LOG.error("Expression [{}] passed to <s:date/> tag which was evaluated to [{}]({}) isn't instance of java.util.Date nor java.util.Calendar!",
name, dateObject, (dateObject != null ? dateObject.getClass() : "null"));
String developerNotification = LocalizedTextUtil.findText(
Date.class,
"devmode.notification",
ActionContext.getContext().getLocale(),
"Developer Notification:\n{0}",
new Object[]{
"Expression [" + name + "] passed to <s:date/> tag which was evaluated to [" + dateObject + "]("
+ (dateObject != null ? dateObject.getClass() : "null") + ") isn't instance of java.util.Date nor java.util.Calendar!"
}
);
LOG.warn(developerNotification);
} else {
LOG.debug("Expression [{}] passed to <s:date/> tag which was evaluated to [{}]({}) isn't instance of java.util.Date nor java.util.Calendar!",
name, dateObject, (dateObject != null ? dateObject.getClass() : "null"));