Package org.jgroups.logging
Class LogFactory
- java.lang.Object
-
- org.jgroups.logging.LogFactory
-
public final class LogFactory extends java.lang.Object
Factory that createsLog
instances.- Since:
- 4.0
- Author:
- Manik Surtani, Bela Ban
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.reflect.Constructor<? extends Log>
ctor_class
protected static CustomLogFactory
custom_log_factory
static boolean
IS_LOG4J2_AVAILABLE
static boolean
IS_SLF4J_AVAILABLE
protected static boolean
use_jdk_logger
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description protected static java.lang.reflect.Constructor<? extends Log>
findConstructor(java.lang.String classname, java.lang.Class<?> arg)
static CustomLogFactory
getCustomLogFactory()
static Log
getLog(java.lang.Class<?> clazz)
protected static boolean
isAvailable(java.lang.String classname)
protected static boolean
isPropertySet(java.lang.String property_name)
static java.lang.String
loggerType()
static void
setCustomLogFactory(CustomLogFactory factory)
static boolean
useJdkLogger()
static void
useJdkLogger(boolean flag)
-
-
-
Field Detail
-
IS_SLF4J_AVAILABLE
public static final boolean IS_SLF4J_AVAILABLE
-
IS_LOG4J2_AVAILABLE
public static final boolean IS_LOG4J2_AVAILABLE
-
use_jdk_logger
protected static boolean use_jdk_logger
-
custom_log_factory
protected static CustomLogFactory custom_log_factory
-
ctor_class
protected static java.lang.reflect.Constructor<? extends Log> ctor_class
-
-
Method Detail
-
getCustomLogFactory
public static CustomLogFactory getCustomLogFactory()
-
setCustomLogFactory
public static void setCustomLogFactory(CustomLogFactory factory)
-
useJdkLogger
public static boolean useJdkLogger()
-
useJdkLogger
public static void useJdkLogger(boolean flag)
-
getLog
public static Log getLog(java.lang.Class<?> clazz)
-
loggerType
public static java.lang.String loggerType()
-
isAvailable
protected static boolean isAvailable(java.lang.String classname)
-
isPropertySet
protected static boolean isPropertySet(java.lang.String property_name)
-
findConstructor
protected static java.lang.reflect.Constructor<? extends Log> findConstructor(java.lang.String classname, java.lang.Class<?> arg) throws java.lang.Exception
- Throws:
java.lang.Exception
-
-