public abstract class AbstractLogger extends Object implements net.pwall.log.Logger
Logger implementations.| Modifier | Constructor and Description |
|---|---|
protected |
AbstractLogger(String name,
net.pwall.log.Level level,
Clock clock)
|
| Modifier and Type | Method and Description |
|---|---|
Clock |
getClock()
Get the
Clock used by this AbstractLogger. |
net.pwall.log.Level |
getLevel()
Get the minimum level to be output by this
AbstractLogger. |
String |
getName()
Get the name associated with this
AbstractLogger. |
protected static void |
outputMultiLine(String message,
Consumer<String> outputFunction)
Split a line containing newline characters into separate log entries, so that malicious code can not create
deceptive log lines.
|
void |
setLevel(net.pwall.log.Level level)
Set the minimum level to be output by this
AbstractLogger. |
public String getName()
AbstractLogger.getName in interface net.pwall.log.Loggerpublic net.pwall.log.Level getLevel()
AbstractLogger.getLevel in interface net.pwall.log.LoggerLevelpublic void setLevel(net.pwall.log.Level level)
AbstractLogger.setLevel in interface net.pwall.log.Loggerlevel - the new Levelpublic Clock getClock()
Clock used by this AbstractLogger.getClock in interface net.pwall.log.LoggerClockprotected static void outputMultiLine(String message, Consumer<String> outputFunction)
message - the log messageoutputFunction - an output function that takes a single line (which by now will not contain newline)Copyright © 2024. All rights reserved.