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 java.lang.reflect.Constructor<? extends Log>
ctor_str
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)
static Log
getLog(java.lang.String category)
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
-
ctor_str
protected static java.lang.reflect.Constructor<? extends Log> ctor_str
-
-
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)
-
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)
-
getLog
public static Log getLog(java.lang.Class<?> clazz)
-
getLog
public static Log getLog(java.lang.String category)
-
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
-
-