generator.writeStringField("environment", this.environment);
generator.writeStringField("serverName", this.serverName);
generator.writeStringField("backtrace",
ExceptionUtils.getStackTrace(throwable));
generator.writeStringField("message", rootThrowable.getMessage());
generator.writeStringField("logMessage", message);
generator.writeStringField("type", rootThrowable.getClass().getName());
if (level != Level.ERROR) {
generator.writeStringField("errorLevel", level.toString());
}
writeContext(generator);