Refine search
@Plugin(name = "PidFilePatternConverter", category = "FileConverter") @ConverterKeys({ "pid" }) public class PidFilePatternConverter extends AbstractPatternConverter implements ArrayPatternConverter {
for (final String key : keys.value()) { if (converters.containsKey(key)) { LOGGER.warn("Converter key '{}' is already mapped to '{}'. " +
@Plugin(name = "HexThreadIdPatternConverter", category = "Converter") @ConverterKeys({"hexTid", "hexThreadId"}) public class HexThreadIdPatternConverter extends LogEventPatternConverter {
@Plugin(name = "MemberNamePatternConverter", category = "Converter") @ConverterKeys("memberName") public class MemberNamePatternConverter extends LogEventPatternConverter {
@Plugin(name = "PidFilePatternConverter", category = "FileConverter") @ConverterKeys({ "pid" }) public class PidFilePatternConverter extends AbstractPatternConverter implements ArrayPatternConverter {
@Plugin(name = "WhitespaceThrowablePatternConverter", category = PatternConverter.CATEGORY) @ConverterKeys({ "wEx", "wThrowable", "wException" }) public final class WhitespaceThrowablePatternConverter extends ThrowablePatternConverter {
@Plugin(name = "ExtendedWhitespaceThrowablePatternConverter", category = PatternConverter.CATEGORY) @ConverterKeys({ "xwEx", "xwThrowable", "xwException" }) public final class ExtendedWhitespaceThrowablePatternConverter extends ThrowablePatternConverter {
@Plugin(name = "color", category = PatternConverter.CATEGORY) @ConverterKeys({ "clr", "color" }) public final class ColorConverter extends LogEventPatternConverter {
@Plugin(name = "TestFormatPatternConverter", category = "Converter") @ConverterKeys("testformat") public static final class TestFormatPatternConverter extends LogEventPatternConverter { private TestFormatPatternConverter() { super("Format", "testformat"); } public static TestFormatPatternConverter newInstance(final String[] options) { return new TestFormatPatternConverter(); } @Override public void format(final LogEvent event, final StringBuilder toAppendTo) { toAppendTo.append(event.getMessage().getFormat()); } }
@Plugin(name = "TestParametersPatternConverter", category = "Converter") @ConverterKeys("testparameters") public static final class TestParametersPatternConverter extends LogEventPatternConverter { private TestParametersPatternConverter() { super("Parameters", "testparameters"); } public static TestParametersPatternConverter newInstance(final String[] options) { return new TestParametersPatternConverter(); } @Override public void format(final LogEvent event, final StringBuilder toAppendTo) { toAppendTo.append('['); Object[] parameters = event.getMessage().getParameters(); if (parameters != null) { for (int i = 0; i < parameters.length; i++) { StringBuilders.appendValue(toAppendTo, parameters[i]); if (i != parameters.length - 1) { toAppendTo.append(','); } } } toAppendTo.append(']'); } }
@Plugin(category = PatternConverter.CATEGORY, name = "NodeNamePatternConverter") @ConverterKeys({"node_name"}) public final class NodeNamePatternConverter extends LogEventPatternConverter {
@Plugin(name = "Log4JStacktraceConverter", category = "Converter") @ConverterKeys({ "stacktrace" }) public class Log4JStacktraceConverter extends LogEventPatternConverter { public static final String WORD = "stacktrace"; public Log4JStacktraceConverter(String[] options) { super(WORD, WORD); } public static Log4JStacktraceConverter newInstance(final String[] options) { return new Log4JStacktraceConverter(options); } @Override public void format(LogEvent event, StringBuilder toAppendTo) { StacktraceConverter.CONVERTER.convert(event.getThrown(), toAppendTo); } }
@Plugin(name = "TimestampConverter", category = "Converter") @ConverterKeys({ "tstamp" }) public class TimestampConverter extends LogEventPatternConverter { public static final String WORD = "tstamp"; public TimestampConverter(String[] options) { super(WORD, WORD); } public static TimestampConverter newInstance(final String[] options) { return new TimestampConverter(options); } @Override public void format(LogEvent event, StringBuilder toAppendTo) { toAppendTo.append(System.nanoTime()); } }
/** * Magenta style pattern converter. Adds ANSI color styling to the result of the enclosed pattern. */ @Plugin(name = Magenta.NAME, category = "Converter") @ConverterKeys(Magenta.NAME) public static final class Magenta extends AbstractStyleNameConverter { /** Magenta */ protected static final String NAME = "magenta"; /** * Constructs the converter. This constructor must be public. * * @param formatters The PatternFormatters to generate the text to manipulate. * @param styling The styling that should encapsulate the pattern. */ public Magenta(final List<PatternFormatter> formatters, final String styling) { super(NAME, formatters, styling); } /** * Gets an instance of the class (called via reflection). * * @param config The current Configuration. * @param options The pattern options, may be null. If the first element is "short", only the first line of the * throwable will be formatted. * @return new instance of class or null */ public static Magenta newInstance(final Configuration config, final String[] options) { return newInstance(Magenta.class, NAME, config, options); } }
/** * Red style pattern converter. Adds ANSI color styling to the result of the enclosed pattern. */ @Plugin(name = Red.NAME, category = "Converter") @ConverterKeys(Red.NAME) public static final class Red extends AbstractStyleNameConverter { /** Red */ protected static final String NAME = "red"; /** * Constructs the converter. This constructor must be public. * * @param formatters The PatternFormatters to generate the text to manipulate. * @param styling The styling that should encapsulate the pattern. */ public Red(final List<PatternFormatter> formatters, final String styling) { super(NAME, formatters, styling); } /** * Gets an instance of the class (called via reflection). * * @param config The current Configuration. * @param options The pattern options, may be null. If the first element is "short", only the first line of the * throwable will be formatted. * @return new instance of class or null */ public static Red newInstance(final Configuration config, final String[] options) { return newInstance(Red.class, NAME, config, options); } }
/** * Black style pattern converter. Adds ANSI color styling to the result of the enclosed pattern. */ @Plugin(name = Black.NAME, category = "Converter") @ConverterKeys(Black.NAME) public static final class Black extends AbstractStyleNameConverter { /** Black */ protected static final String NAME = "black"; /** * Constructs the converter. This constructor must be public. * * @param formatters The PatternFormatters to generate the text to manipulate. * @param styling The styling that should encapsulate the pattern. */ public Black(final List<PatternFormatter> formatters, final String styling) { super(NAME, formatters, styling); } /** * Gets an instance of the class (called via reflection). * * @param config The current Configuration. * @param options The pattern options, may be null. If the first element is "short", only the first line of the * throwable will be formatted. * @return new instance of class or null */ public static Black newInstance(final Configuration config, final String[] options) { return newInstance(Black.class, NAME, config, options); } }
/** * Cyan style pattern converter. Adds ANSI color styling to the result of the enclosed pattern. */ @Plugin(name = Cyan.NAME, category = "Converter") @ConverterKeys(Cyan.NAME) public static final class Cyan extends AbstractStyleNameConverter { /** Cyan */ protected static final String NAME = "cyan"; /** * Constructs the converter. This constructor must be public. * * @param formatters The PatternFormatters to generate the text to manipulate. * @param styling The styling that should encapsulate the pattern. */ public Cyan(final List<PatternFormatter> formatters, final String styling) { super(NAME, formatters, styling); } /** * Gets an instance of the class (called via reflection). * * @param config The current Configuration. * @param options The pattern options, may be null. If the first element is "short", only the first line of the * throwable will be formatted. * @return new instance of class or null */ public static Cyan newInstance(final Configuration config, final String[] options) { return newInstance(Cyan.class, NAME, config, options); } }
/** * Blue style pattern converter. Adds ANSI color styling to the result of the enclosed pattern. */ @Plugin(name = Blue.NAME, category = "Converter") @ConverterKeys(Blue.NAME) public static final class Blue extends AbstractStyleNameConverter { /** Blue */ protected static final String NAME = "blue"; /** * Constructs the converter. This constructor must be public. * * @param formatters The PatternFormatters to generate the text to manipulate. * @param styling The styling that should encapsulate the pattern. */ public Blue(final List<PatternFormatter> formatters, final String styling) { super(NAME, formatters, styling); } /** * Gets an instance of the class (called via reflection). * * @param config The current Configuration. * @param options The pattern options, may be null. If the first element is "short", only the first line of the * throwable will be formatted. * @return new instance of class or null */ public static Blue newInstance(final Configuration config, final String[] options) { return newInstance(Blue.class, NAME, config, options); } }
/** * Green style pattern converter. Adds ANSI color styling to the result of the enclosed pattern. */ @Plugin(name = Green.NAME, category = "Converter") @ConverterKeys(Green.NAME) public static final class Green extends AbstractStyleNameConverter { /** Green */ protected static final String NAME = "green"; /** * Constructs the converter. This constructor must be public. * * @param formatters The PatternFormatters to generate the text to manipulate. * @param styling The styling that should encapsulate the pattern. */ public Green(final List<PatternFormatter> formatters, final String styling) { super(NAME, formatters, styling); } /** * Gets an instance of the class (called via reflection). * * @param config The current Configuration. * @param options The pattern options, may be null. If the first element is "short", only the first line of the * throwable will be formatted. * @return new instance of class or null */ public static Green newInstance(final Configuration config, final String[] options) { return newInstance(Green.class, NAME, config, options); } }
/** * White style pattern converter. Adds ANSI color styling to the result of the enclosed pattern. */ @Plugin(name = White.NAME, category = "Converter") @ConverterKeys(White.NAME) public static final class White extends AbstractStyleNameConverter { /** White */ protected static final String NAME = "white"; /** * Constructs the converter. This constructor must be public. * * @param formatters The PatternFormatters to generate the text to manipulate. * @param styling The styling that should encapsulate the pattern. */ public White(final List<PatternFormatter> formatters, final String styling) { super(NAME, formatters, styling); } /** * Gets an instance of the class (called via reflection). * * @param config The current Configuration. * @param options The pattern options, may be null. If the first element is "short", only the first line of the * throwable will be formatted. * @return new instance of class or null */ public static White newInstance(final Configuration config, final String[] options) { return newInstance(White.class, NAME, config, options); } }