Repository: quarkusio/quarkus
Issue: Gelf handler chunking messages

**Describe the bug**
The gelf handler chunking the messages exceeding 8192 bytes, any meaning full java stack trace exceed this limits. Once messages are chunked Fluentd gelf input plugin rejects the chunked message because of unknown format and log statement never reach elasticsearch

**Expected behavior**
Allow users to configure the maximumMessageSize

```quarkus.log.handler.gelf.maximumMessageSize=2000000```

**Actual behavior**
Message chunking and loss of log statements


**To Reproduce**
Steps to reproduce the behavior:
1. Configure Gelf logging in quarkus
2. Create a log message size greater than 8192 bytes
3. Notice the log statement chunking and underlying log aggregation rejecting the chunked messages (In this case EFK)

**Configuration**
```properties
# Add your application.properties here, if applicable.
quarkus.log.handler.gelf.enabled=true
quarkus.log.handler.gelf.host=${GELF_HOST:localhost}
quarkus.log.handler.gelf.port=${GELF_PORT:12201}
```

**Screenshots**
(If applicable, add screenshots to help explain your problem.)

**Environment (please complete the following information):**
 - Output of `uname -a` or `ver`: amazon linux 2
 - Output of `java -version`:  11.0.6" 2020-01-14
 - GraalVM version (if different from Java): GraalVM CE 19.3.1
 - Quarkus version or git rev: 1.4.2-Final
 - Build tool (ie. output of `mvnw --version` or `gradlew --version`): mvn

**Additional context**
JBOSS logmanager JSON logging is outstanding, please support socket appender in addition to existing console, file. So that we can push the logs directly to fluentd tcp source.


Changed files:
extensions/logging-gelf/runtime/src/main/java/io/quarkus/logging/gelf/GelfConfig.java
extensions/logging-gelf/runtime/src/main/java/io/quarkus/logging/gelf/GelfLogHandlerRecorder.java

diff --git a/extensions/logging-gelf/runtime/src/main/java/io/quarkus/logging/gelf/GelfConfig.java b/extensions/logging-gelf/runtime/src/main/java/io/quarkus/logging/gelf/GelfConfig.java
index c1b329d0399..acd10968d4a 100644
--- a/extensions/logging-gelf/runtime/src/main/java/io/quarkus/logging/gelf/GelfConfig.java
+++ b/extensions/logging-gelf/runtime/src/main/java/io/quarkus/logging/gelf/GelfConfig.java
@@ -98,4 +98,11 @@ public class GelfConfig {
      */
     @ConfigItem
     public boolean includeFullMdc;
+
+    /**
+     * Maximum message size (in bytes).
+     * If the message size is exceeded, the appender will submit the message in multiple chunks.
+     */
+    @ConfigItem(defaultValue = "8192")
+    public int maximumMessageSize;
 }
diff --git a/extensions/logging-gelf/runtime/src/main/java/io/quarkus/logging/gelf/GelfLogHandlerRecorder.java b/extensions/logging-gelf/runtime/src/main/java/io/quarkus/logging/gelf/GelfLogHandlerRecorder.java
index 0c845cb03eb..97c1ac6e3cf 100644
--- a/extensions/logging-gelf/runtime/src/main/java/io/quarkus/logging/gelf/GelfLogHandlerRecorder.java
+++ b/extensions/logging-gelf/runtime/src/main/java/io/quarkus/logging/gelf/GelfLogHandlerRecorder.java
@@ -29,6 +29,7 @@ public RuntimeValue<Optional<Handler>> initializeHandler(final GelfConfig config
         handler.setHost(config.host);
         handler.setPort(config.port);
         handler.setLevel(config.level);
+        handler.setMaximumMessageSize(config.maximumMessageSize);
 
         // handle additional fields
         if (!config.additionalField.isEmpty()) {