code: @Override
      public String format(LogRecord record) {
          final JsonObject jsonEvent = new JsonObject();
  
          jsonEvent.addProperty("v", 0);
          jsonEvent.addProperty("level", BUNYAN_LEVEL.get(record.getLevel()));
          jsonEvent.addProperty("name", record.getLoggerName());
          jsonEvent.addProperty("hostname", HOSTNAME);
          jsonEvent.addProperty("pid", record.getThreadID());
          jsonEvent.addProperty("time", formatAsIsoUTCDateTime(record.getMillis()));
          jsonEvent.addProperty("msg", record.getMessage());
          jsonEvent.addProperty("src", record.getSourceClassName());
  
          final Throwable thrown = record.getThrown();
          if (thrown != null && record.getLevel().intValue() >= Level.WARNING.intValue()) {
              JsonObject jsonError = new JsonObject();
  
              jsonError.addProperty("message", thrown.getMessage());
              jsonError.addProperty("name", thrown.getClass().getSimpleName());
  
              StringWriter sw = new StringWriter();
              PrintWriter pw = new PrintWriter(sw);
              thrown.printStackTrace(pw);
              jsonError.addProperty("stack", sw.toString());
              jsonEvent.add("err", jsonError);
          }
  
          return GSON.toJson(jsonEvent) + "\n";
      }
docs: {@inheritDoc}