Bug 472601: org.eclipse.jetty.util.log.Log.setLog(Logger) fixed

This commit is contained in:
Greg Wilkins 2015-07-16 09:08:00 +10:00
parent deba2f0d6a
commit c5b36c6353
1 changed files with 3 additions and 2 deletions

View File

@ -169,8 +169,8 @@ public class Log
try
{
Class<?> log_class = Loader.loadClass(Log.class, __logClass);
if (LOG == null || !LOG.getClass().equals(log_class))
Class<?> log_class = __logClass==null?null:Loader.loadClass(Log.class, __logClass);
if (LOG == null || (log_class!=null && !LOG.getClass().equals(log_class)))
{
LOG = (Logger)log_class.newInstance();
LOG.debug("Logging to {} via {}", LOG, log_class.getName());
@ -212,6 +212,7 @@ public class Log
public static void setLog(Logger log)
{
Log.LOG = log;
__logClass=null;
}
/**