public class ConsoleLoggerFactory extends LoggerFactory
LoggerFactory that creates ConsoleLogger objects.| Constructor and Description |
|---|
ConsoleLoggerFactory()
Construct a
ConsoleLoggerFactory with the standard default logging level and output stream. |
ConsoleLoggerFactory(Level defaultLevel)
Construct a
ConsoleLoggerFactory with the supplied default logging level, using the standard output
stream. |
ConsoleLoggerFactory(Level defaultLevel,
PrintStream output)
Construct a
ConsoleLoggerFactory with the supplied default logging level and output stream. |
ConsoleLoggerFactory(PrintStream output)
Construct a
ConsoleLoggerFactory with the standard default logging level and the supplied output stream. |
| Modifier and Type | Method and Description |
|---|---|
static ConsoleLoggerFactory |
getInstance()
Get the shared
ConsoleLoggerFactory instance. |
ConsoleLogger |
getLogger(String name)
Get a
ConsoleLogger with the supplied name and the current default Level. |
ConsoleLogger |
getLogger(String name,
Level level)
Get a
ConsoleLogger with the supplied name and Level. |
PrintStream |
getOutput()
Get the output stream used by
ConsoleLogger instances created by this ConsoleLoggerFactory. |
void |
setOutput(PrintStream output)
Set the output stream used by
ConsoleLogger instances created by this ConsoleLoggerFactory. |
getConsoleLogger, getDefault, getDefaultLevel, getDefaultLogger, getDefaultLogger, getLogger, getLogger, setDefault, setDefaultLevelpublic ConsoleLoggerFactory(Level defaultLevel, PrintStream output)
ConsoleLoggerFactory with the supplied default logging level and output stream.defaultLevel - the default logging leveloutput - the output stream to be usedNullPointerException - if the output stream is nullpublic ConsoleLoggerFactory(PrintStream output)
ConsoleLoggerFactory with the standard default logging level and the supplied output stream.output - the output stream to be usedNullPointerException - if the output stream is nullpublic ConsoleLoggerFactory(Level defaultLevel)
ConsoleLoggerFactory with the supplied default logging level, using the standard output
stream.defaultLevel - the default logging levelpublic ConsoleLoggerFactory()
ConsoleLoggerFactory with the standard default logging level and output stream.public PrintStream getOutput()
ConsoleLogger instances created by this ConsoleLoggerFactory.public void setOutput(PrintStream output)
ConsoleLogger instances created by this ConsoleLoggerFactory.output - the output streamNullPointerException - if the output stream is nullpublic ConsoleLogger getLogger(String name)
ConsoleLogger with the supplied name and the current default Level.getLogger in class LoggerFactoryname - the nameConsoleLoggerNullPointerException - if the name is nullpublic ConsoleLogger getLogger(String name, Level level)
ConsoleLogger with the supplied name and Level.getLogger in class LoggerFactoryname - the namelevel - the LevelConsoleLoggerNullPointerException - if the name is nullpublic static ConsoleLoggerFactory getInstance()
ConsoleLoggerFactory instance.Copyright © 2021. All rights reserved.