mirror of
https://github.com/apache/struts.git
synced 2026-08-11 01:27:14 +00:00
WW-4453 Reduces level to WARN
This commit is contained in:
@@ -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"));
|
||||
|
||||
Reference in New Issue
Block a user