Java 类org.apache.logging.log4j.core.pattern.LogEventPatternConverter 实例源码

项目:logging-log4j2    文件:ThreadLocalVsPoolBenchmark.java   
/**
 */
private static PatternFormatter[] createFormatters() {
    final Configuration config = new DefaultConfiguration();
    final PatternParser parser = new PatternParser(config, "Converter", LogEventPatternConverter.class);
    final List<PatternFormatter> result = parser.parse(LOG4JPATTERN, false, true);
    return result.toArray(new PatternFormatter[result.size()]);
}
项目:cf-java-logging-support    文件:AbstractConverterTest.java   
protected String format(LogEventPatternConverter converter, LogEvent event) {
    StringBuilder sb = new StringBuilder();
    converter.format(event, sb);
    return sb.toString();
}