public class BasicFormatter extends AbstractFormatter
FormattingLogger.| Modifier and Type | Field and Description |
|---|---|
static int |
defaultNameLengthLimit
Default length limit for display of logger name
|
ANSI_FG_BLUE, ANSI_FG_GREEN, ANSI_FG_MAGENTA, ANSI_FG_RED, ANSI_FG_YELLOW| Constructor and Description |
|---|
BasicFormatter() |
| Modifier and Type | Method and Description |
|---|---|
void |
format(long millis,
net.pwall.log.Logger logger,
net.pwall.log.Level level,
Object message,
Throwable throwable,
IntConsumer outFunction)
Format a log message.
|
int |
getNameLengthLimit()
Get the length limit used for the output of the logger name.
|
boolean |
isColouredLevel()
Get the switch controlling use of colour for the display of
Level. |
void |
setColouredLevel(boolean colouredLevel)
Set the switch controlling use of colour for the display of
Level. |
void |
setNameLengthLimit(int nameLengthLimit)
Set the length limit used for the output of the logger name.
|
getDayMillis, outputANSIColour, outputLevel, outputLevel5, outputLevel5Coloured, outputLevelColoured, outputNameWithLimit, outputText, outputTimepublic static final int defaultNameLengthLimit
public void format(long millis,
net.pwall.log.Logger logger,
net.pwall.log.Level level,
Object message,
Throwable throwable,
IntConsumer outFunction)
millis - the time of the log message as milliseconds from the start of the epochlogger - the Logger that originated the log eventlevel - the Levelmessage - the messageoutFunction - the IntConsumer to use to output the messagethrowable - an optional Throwablepublic int getNameLengthLimit()
public void setNameLengthLimit(int nameLengthLimit)
nameLengthLimit - the new length limitpublic boolean isColouredLevel()
Level.public void setColouredLevel(boolean colouredLevel)
Level.colouredLevel - the new switch valueCopyright © 2024. All rights reserved.