mirror of https://github.com/apache/openjpa.git
Refrain from logging if verifying log factory plugin.
git-svn-id: https://svn.apache.org/repos/asf/openjpa/branches/1.0.x@1481688 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
01bc0d257b
commit
5b0cf2599f
|
@ -217,7 +217,6 @@ public class ConfigurationImpl
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setLog(String log) {
|
public void setLog(String log) {
|
||||||
assertNotReadOnly();
|
|
||||||
logFactoryPlugin.setString(log);
|
logFactoryPlugin.setString(log);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@ package org.apache.openjpa.lib.conf;
|
||||||
|
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.apache.openjpa.lib.log.Log;
|
import org.apache.openjpa.lib.log.Log;
|
||||||
|
import org.apache.openjpa.lib.log.LogFactory;
|
||||||
import org.apache.openjpa.lib.util.Localizer;
|
import org.apache.openjpa.lib.util.Localizer;
|
||||||
import org.apache.openjpa.lib.util.ParseException;
|
import org.apache.openjpa.lib.util.ParseException;
|
||||||
|
|
||||||
|
@ -104,7 +105,8 @@ public class PluginValue extends ObjectValue {
|
||||||
|
|
||||||
// ensure plugin value is compatible with plugin type
|
// ensure plugin value is compatible with plugin type
|
||||||
if (obj != null && !type.isAssignableFrom(obj.getClass())) {
|
if (obj != null && !type.isAssignableFrom(obj.getClass())) {
|
||||||
Log log = (conf == null) ? null : conf.getConfigurationLog();
|
Log log = (conf == null || type.equals(LogFactory.class))
|
||||||
|
? null : conf.getConfigurationLog();
|
||||||
String msg = getIncompatiblePluginMessage(obj, type);
|
String msg = getIncompatiblePluginMessage(obj, type);
|
||||||
if (log != null && log.isErrorEnabled()) {
|
if (log != null && log.isErrorEnabled()) {
|
||||||
log.error(msg);
|
log.error(msg);
|
||||||
|
|
Loading…
Reference in New Issue