public abstract class LoggerFactory extends Object
LoggerFactory interface allows for the implementation of a variety of processes of Logger object
creation.| Constructor and Description |
|---|
LoggerFactory() |
| Modifier and Type | Method and Description |
|---|---|
static ConsoleLogger |
getConsoleLogger(String name)
Get a
ConsoleLogger with the specified name. |
static LoggerFactory |
getDefault()
Get the default
LoggerFactory (usually, but not necessarily, a DefaultLoggerFactory). |
Level |
getDefaultLevel()
|
static Logger |
getDefaultLogger(Class<?> javaClass)
Get a
Logger from the default LoggerFactory, with the supplied name. |
static Logger |
getDefaultLogger(String name)
Get a
Logger from the default LoggerFactory, with the supplied name. |
Logger |
getLogger(Class<?> javaClass)
Get a
Logger for the nominated Java class. |
Logger |
getLogger(Class<?> javaClass,
Level level)
|
abstract Logger |
getLogger(String name)
|
abstract Logger |
getLogger(String name,
Level level)
|
static void |
setDefault(LoggerFactory loggerFactory)
Set the default
LoggerFactory. |
void |
setDefaultLevel(Level defaultLevel)
|
public abstract Logger getLogger(String name)
name - the nameLoggerNullPointerException - if the name is nullpublic abstract Logger getLogger(String name, Level level)
name - the namelevel - the LevelLoggerNullPointerException - if the name is nullpublic Logger getLogger(Class<?> javaClass)
Logger for the nominated Java class.javaClass - the Java ClassLoggerNullPointerException - if the Java class is nullpublic Logger getLogger(Class<?> javaClass, Level level)
javaClass - the Java Classlevel - the LevelLoggerNullPointerException - if the Java class is nullpublic void setDefaultLevel(Level defaultLevel)
defaultLevel - the new default Levelpublic static LoggerFactory getDefault()
LoggerFactory (usually, but not necessarily, a DefaultLoggerFactory).LoggerFactorypublic static void setDefault(LoggerFactory loggerFactory)
LoggerFactory.loggerFactory - the new default LoggerFactorypublic static ConsoleLogger getConsoleLogger(String name)
ConsoleLogger with the specified name.name - the nameConsoleLoggerpublic static Logger getDefaultLogger(String name)
Logger from the default LoggerFactory, with the supplied name.name - the nameLoggerNullPointerException - if the name is nullCopyright © 2021. All rights reserved.