Renamed InternalLoggerFactory.get/setDefault to get/setDefaultFactory to clarify its meaning.
This commit is contained in:
parent
7c2934c15f
commit
88b7cf3e36
@ -30,17 +30,17 @@ package org.jboss.netty.logging;
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public abstract class InternalLoggerFactory {
|
public abstract class InternalLoggerFactory {
|
||||||
private static volatile InternalLoggerFactory defaultInstance = new JdkLoggerFactory();
|
private static volatile InternalLoggerFactory defaultFactory = new JdkLoggerFactory();
|
||||||
|
|
||||||
public static InternalLoggerFactory getDefault() {
|
public static InternalLoggerFactory getDefaultFactory() {
|
||||||
return defaultInstance;
|
return defaultFactory;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setDefault(InternalLoggerFactory defaultInstance) {
|
public static void setDefaultFactory(InternalLoggerFactory defaultFactory) {
|
||||||
if (defaultInstance == null) {
|
if (defaultFactory == null) {
|
||||||
throw new NullPointerException("defaultInstance");
|
throw new NullPointerException("defaultFactory");
|
||||||
}
|
}
|
||||||
InternalLoggerFactory.defaultInstance = defaultInstance;
|
InternalLoggerFactory.defaultFactory = defaultFactory;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static InternalLogger getInstance(Class<?> clazz) {
|
public static InternalLogger getInstance(Class<?> clazz) {
|
||||||
@ -48,7 +48,7 @@ public abstract class InternalLoggerFactory {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static InternalLogger getInstance(String name) {
|
public static InternalLogger getInstance(String name) {
|
||||||
return getDefault().newInstance(name);
|
return getDefaultFactory().newInstance(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract InternalLogger newInstance(String name);
|
public abstract InternalLogger newInstance(String name);
|
||||||
|
Loading…
Reference in New Issue
Block a user