title: Graylog GELF max field size
body: <p>I'm trying to insert web service input/output as xml into Graylog. To do this I used "GELFJ - A GELF Appender for Log4j and a GELF Handler for JDK Logging". Here is the sample code:</p>
  
  <pre><code>public static void main(String[] args) throws IOException {
      GelfSender gelfSender = new GelfTCPSender("172.21.120.139", 12201);
  
      String xmlMessage = readFile("c:\\temp\\xml.xml");
  
      GelfMessage message = new GelfMessage("short message", "long message", System.currentTimeMillis(), "1");
      message.setHost("localhost");
  
      message.addField("XML", xmlMessage);
      message.addField("LEN", xmlMessage.length());
  
      if (message.isValid()) {
          GelfSenderResult result = gelfSender.sendMessage(message);
          Exception exception = result.getException();
          if (exception != null) {
              exception.printStackTrace();
          }
      } else {
          System.err.println("Message is not valid!");
      }
  }
  </code></pre>
  
  <p>And this is the GELF TCP input properties.</p>
  
  <p><a href="https://i.stack.imgur.com/K4LUi.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/K4LUi.png" alt="enter image description here"></a></p>
  
  <p>I can't insert a message field bigger than 20k (characters). and a message total size bigger than 1.6 MB.</p>
  
  <p>My question is what are the limits of a message field and the message total size in bytes?</p>