use of co.elastic.logging.log4j2.EcsLayout in project logging-log4j2 by apache.
the class JsonTemplateLayoutBenchmarkState method createEcsLayout.
private static EcsLayout createEcsLayout() {
final EcsLayout layout = EcsLayout.newBuilder().setConfiguration(CONFIGURATION).setServiceName("benchmark").build();
final Charset layoutCharset = layout.getCharset();
// uses UTF-8 internally.
if (!CHARSET.equals(layoutCharset)) {
throw new IllegalArgumentException("was expecting EcsLayout charset to be: " + CHARSET + ", found: " + layoutCharset);
}
return layout;
}