public class ConsoleLoggerFactory extends AbstractLoggerFactory<ConsoleLogger>
LoggerFactory that creates ConsoleLogger objects. This has largely been superseded by the
FormattingLoggerFactory, and may be deprecated in future.defaultLevelPropertyName, systemDefaultLevel| Constructor and Description |
|---|
ConsoleLoggerFactory()
Construct a
ConsoleLoggerFactory with the standard default logging level and output stream. |
ConsoleLoggerFactory(net.pwall.log.Level defaultLevel)
Construct a
ConsoleLoggerFactory with the supplied default logging level, using the standard output
stream. |
ConsoleLoggerFactory(net.pwall.log.Level defaultLevel,
Clock defaultClock,
PrintStream output)
Construct a
ConsoleLoggerFactory with the supplied default logging level, default clock and output
stream. |
ConsoleLoggerFactory(net.pwall.log.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,
net.pwall.log.Level level,
Clock clock)
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. |
getCachedLogger, getDefaultClock, getDefaultLevel, putCachedLogger, setDefaultClock, setDefaultLevelpublic ConsoleLoggerFactory(net.pwall.log.Level defaultLevel,
Clock defaultClock,
PrintStream output)
ConsoleLoggerFactory with the supplied default logging level, default clock and output
stream.defaultLevel - the default logging leveldefaultClock - the default Clockoutput - the output stream to be usedNullPointerException - if the output stream is nullpublic ConsoleLoggerFactory(net.pwall.log.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(net.pwall.log.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, net.pwall.log.Level level, Clock clock)
ConsoleLogger with the supplied name and Level.name - the namelevel - the LevelConsoleLoggerLoggerException - if the name is null, empty or contains non-ASCII characterspublic static ConsoleLoggerFactory getInstance()
ConsoleLoggerFactory instance.Copyright © 2024. All rights reserved.