private final Gson gson;
private LogEventConverter(String hostname) {
gson = new GsonBuilder()
.registerTypeAdapter(StackTraceElement.class, new StackTraceElementCodec())
.registerTypeAdapter(LogThrowable.class, new LogThrowableCodec())
.registerTypeAdapter(ILoggingEvent.class, new ILoggingEventSerializer(hostname))
.create();
}