/** */ 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()]); }
protected String format(LogEventPatternConverter converter, LogEvent event) { StringBuilder sb = new StringBuilder(); converter.format(event, sb); return sb.toString(); }