@Plugin(name="color",
category="Converter")
public final class ColorConverter
extends org.apache.logging.log4j.core.pattern.LogEventPatternConverter
LogEventPatternConverter colors output using the AnsiOutput
class. A single option 'styling' can be provided to the converter, or if not specified
color styling will be picked based on the logging level.| Modifier and Type | Method and Description |
|---|---|
protected void |
appendAnsiString(StringBuilder toAppendTo,
String in,
AnsiElement element) |
void |
format(org.apache.logging.log4j.core.LogEvent event,
StringBuilder toAppendTo) |
boolean |
handlesThrowable() |
static ColorConverter |
newInstance(org.apache.logging.log4j.core.config.Configuration config,
String[] options)
Creates a new instance of the class.
|
format, isVariablepublic static ColorConverter newInstance(org.apache.logging.log4j.core.config.Configuration config, String[] options)
config - the configurationoptions - the optionsnull if the options are invalidpublic boolean handlesThrowable()
handlesThrowable in class org.apache.logging.log4j.core.pattern.LogEventPatternConverterpublic void format(org.apache.logging.log4j.core.LogEvent event,
StringBuilder toAppendTo)
format in class org.apache.logging.log4j.core.pattern.LogEventPatternConverterprotected void appendAnsiString(StringBuilder toAppendTo, String in, AnsiElement element)
Copyright © 2016 Pivotal Software, Inc.. All rights reserved.