org.apache.logging.log4j.core.pattern.LogEventPatternConverter Java Examples

The following examples show how to use org.apache.logging.log4j.core.pattern.LogEventPatternConverter. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AbstractConverterTest.java    From cf-java-logging-support with Apache License 2.0 4 votes vote down vote up
protected String format(LogEventPatternConverter converter, LogEvent event) {
    StringBuilder sb = new StringBuilder();
    converter.format(event, sb);
    return sb.toString();
}
 
Example #2
Source File: ThreadLocalVsPoolBenchmark.java    From logging-log4j2 with Apache License 2.0 4 votes vote down vote up
private static List<PatternFormatter> createFormatters() {
    final Configuration config = new DefaultConfiguration();
    final PatternParser parser = new PatternParser(config, "Converter", LogEventPatternConverter.class);
    return parser.parse("%d %5p [%t] %c{1} %X{transactionId} - %m%n", false, true);
}