Package io.microsphere.logging
Class LoggerFactory
- java.lang.Object
-
- io.microsphere.logging.LoggerFactory
-
- All Implemented Interfaces:
Prioritized,java.lang.Comparable<Prioritized>
- Direct Known Subclasses:
ACLLoggerFactory,JDKLoggerFactory,NoOpLoggerFactory,Sfl4jLoggerFactory
public abstract class LoggerFactory extends java.lang.Object implements Prioritized
The factory class forLogger
-
-
Field Summary
-
Fields inherited from interface io.microsphere.lang.Prioritized
COMPARATOR, MAX_PRIORITY, MIN_PRIORITY, NORMAL_PRIORITY
-
-
Constructor Summary
Constructors Constructor Description LoggerFactory()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract LoggercreateLogger(java.lang.String name)Create a newLoggerprotected abstract java.lang.StringgetDelegateLoggerClassName()The class name of delegate Loggerstatic LoggergetLogger(java.lang.Class<?> type)Get an instance ofLoggerby typestatic LoggergetLogger(java.lang.String name)Get an instance ofLoggerby nameprotected booleanisAvailable()CurrentLoggerFactoryis available or not-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.microsphere.lang.Prioritized
compareTo, getPriority
-
-
-
-
Method Detail
-
getLogger
@Nonnull public static Logger getLogger(java.lang.Class<?> type)
Get an instance ofLoggerby type- Parameters:
type- the type- Returns:
- non-null
-
getLogger
@Nonnull public static Logger getLogger(java.lang.String name)
Get an instance ofLoggerby name
-
isAvailable
protected boolean isAvailable()
CurrentLoggerFactoryis available or not- Returns:
trueif available
-
getDelegateLoggerClassName
protected abstract java.lang.String getDelegateLoggerClassName()
The class name of delegate Logger- Returns:
- non-null
-
-