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 Logger
createLogger(java.lang.String name)
Create a newLogger
protected abstract java.lang.String
getDelegateLoggerClassName()
The class name of delegate Loggerstatic Logger
getLogger(java.lang.Class<?> type)
Get an instance ofLogger
by typestatic Logger
getLogger(java.lang.String name)
Get an instance ofLogger
by nameprotected boolean
isAvailable()
CurrentLoggerFactory
is 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 ofLogger
by type- Parameters:
type
- the type- Returns:
- non-null
-
getLogger
@Nonnull public static Logger getLogger(java.lang.String name)
Get an instance ofLogger
by name
-
isAvailable
protected boolean isAvailable()
CurrentLoggerFactory
is available or not- Returns:
true
if available
-
getDelegateLoggerClassName
protected abstract java.lang.String getDelegateLoggerClassName()
The class name of delegate Logger- Returns:
- non-null
-
-