code: @Override
      protected void subAppend(LoggingEvent event) {
          GelfMessage gelf = GelfMessageFactory.makeMessage(layout, event, this);
          this.qw.write(gelf.toJson());
          this.qw.write(Layout.LINE_SEP);
  
          if (this.immediateFlush) {
              this.qw.flush();
          }
      }
docs: the important parts.