// Init GSON for underscores
GsonBuilder gsonBuilder = new GsonBuilder();
gsonBuilder.setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES);
this.gson = gsonBuilder.create();
this.patternLayout = new PatternLayout();
this.patternLayout.setContext(new LoggerContext());
this.patternLayout.setPattern(messagePattern);
this.patternLayout.start();
if ( shortMessagePattern == null ) {
this.shortPatternLayout = null;
} else {
this.shortPatternLayout = new PatternLayout();
this.shortPatternLayout.setContext(new LoggerContext());
this.shortPatternLayout.setPattern(shortMessagePattern);
this.shortPatternLayout.start();
}
}