Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.9.0
    • Component/s: None
    • Labels:
      None

      Description

      Gelf TCP endpoint need a NULL-byte between each messages and it doesn't support compression

        Issue Links

          Activity

          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user xjodoin opened a pull request:

          https://github.com/apache/logging-log4j2/pull/67

          LOG4J2-1854 - Add new parameter to include tcp Gelf message delimiter

          You can merge this pull request into a Git repository by running:

          $ git pull https://github.com/xjodoin/logging-log4j2 LOG4J2-1854

          Alternatively you can review and apply these changes as the patch at:

          https://github.com/apache/logging-log4j2/pull/67.patch

          To close this pull request, make a commit to your master/trunk branch
          with (at least) the following in the commit message:

          This closes #67


          commit 0bad728f7a312aa816bfb65bf05f140d7975ecb6
          Author: Xavier Jodoin <xavier@jodoin.me>
          Date: 2017-03-20T18:46:01Z

          LOG4J2-1854 - Add new parameter to include tcp message delimiter


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user xjodoin opened a pull request: https://github.com/apache/logging-log4j2/pull/67 LOG4J2-1854 - Add new parameter to include tcp Gelf message delimiter You can merge this pull request into a Git repository by running: $ git pull https://github.com/xjodoin/logging-log4j2 LOG4J2-1854 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/logging-log4j2/pull/67.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #67 commit 0bad728f7a312aa816bfb65bf05f140d7975ecb6 Author: Xavier Jodoin <xavier@jodoin.me> Date: 2017-03-20T18:46:01Z LOG4J2-1854 - Add new parameter to include tcp message delimiter
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user mikaelstaldal commented on a diff in the pull request:

          https://github.com/apache/logging-log4j2/pull/67#discussion_r108137420

          — Diff: log4j-core/src/main/java/org/apache/logging/log4j/core/layout/GelfLayout.java —
          @@ -135,14 +136,17 @@ public DeflaterOutputStream createDeflaterOutputStream(final OutputStream os) th
          @PluginBuilderAttribute
          private boolean includeThreadContext = true;

          + @PluginBuilderAttribute
          + private boolean includeTcpMessageDelimiter = false;
          — End diff –

          Maybe name this as `includeNullMessageDelimiter` to indicate what it does, rather than what is can be used for?

          Show
          githubbot ASF GitHub Bot added a comment - Github user mikaelstaldal commented on a diff in the pull request: https://github.com/apache/logging-log4j2/pull/67#discussion_r108137420 — Diff: log4j-core/src/main/java/org/apache/logging/log4j/core/layout/GelfLayout.java — @@ -135,14 +136,17 @@ public DeflaterOutputStream createDeflaterOutputStream(final OutputStream os) th @PluginBuilderAttribute private boolean includeThreadContext = true; + @PluginBuilderAttribute + private boolean includeTcpMessageDelimiter = false; — End diff – Maybe name this as `includeNullMessageDelimiter` to indicate what it does, rather than what is can be used for?
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user mikaelstaldal commented on a diff in the pull request:

          https://github.com/apache/logging-log4j2/pull/67#discussion_r108137284

          — Diff: log4j-core/src/main/java/org/apache/logging/log4j/core/layout/GelfLayout.java —
          @@ -237,11 +241,11 @@ public B setAdditionalFields(KeyValuePair[] additionalFields) {
          @Deprecated
          public GelfLayout(final String host, final KeyValuePair[] additionalFields, final CompressionType compressionType,
          final int compressionThreshold, final boolean includeStacktrace) {

          • this(null, host, additionalFields, compressionType, compressionThreshold, includeStacktrace, true);
            + this(null, host, additionalFields, compressionType, compressionThreshold, includeStacktrace, true, false);
              • End diff –

          Please do not change this method since that will break binary compatibility. Users will have to use builder to use the new feature.

          Show
          githubbot ASF GitHub Bot added a comment - Github user mikaelstaldal commented on a diff in the pull request: https://github.com/apache/logging-log4j2/pull/67#discussion_r108137284 — Diff: log4j-core/src/main/java/org/apache/logging/log4j/core/layout/GelfLayout.java — @@ -237,11 +241,11 @@ public B setAdditionalFields(KeyValuePair[] additionalFields) { @Deprecated public GelfLayout(final String host, final KeyValuePair[] additionalFields, final CompressionType compressionType, final int compressionThreshold, final boolean includeStacktrace) { this(null, host, additionalFields, compressionType, compressionThreshold, includeStacktrace, true); + this(null, host, additionalFields, compressionType, compressionThreshold, includeStacktrace, true, false); End diff – Please do not change this method since that will break binary compatibility. Users will have to use builder to use the new feature.
          Hide
          mikaelstaldal Mikael Ståldal added a comment -

          What do you mean by "doesn't support compression"?

          Show
          mikaelstaldal Mikael Ståldal added a comment - What do you mean by "doesn't support compression"?
          Hide
          mikaelstaldal Mikael Ståldal added a comment -

          In what context is this NULL delimiter needed?

          Show
          mikaelstaldal Mikael Ståldal added a comment - In what context is this NULL delimiter needed?
          Hide
          xjodoin Xavier Jodoin added a comment -

          When you use the TCP endpoint graylog use that to know when the message ended and graylog doesn't support compression for message with the TCP endpoint

          Show
          xjodoin Xavier Jodoin added a comment - When you use the TCP endpoint graylog use that to know when the message ended and graylog doesn't support compression for message with the TCP endpoint
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user mikaelstaldal commented on the issue:

          https://github.com/apache/logging-log4j2/pull/67

          I have fixed this in master branch, this PR can be closed.

          Show
          githubbot ASF GitHub Bot added a comment - Github user mikaelstaldal commented on the issue: https://github.com/apache/logging-log4j2/pull/67 I have fixed this in master branch, this PR can be closed.
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 01d0f5adee12146356d9574f3de52a273696825e in logging-log4j2's branch refs/heads/master from Mikael Ståldal
          [ https://git-wip-us.apache.org/repos/asf?p=logging-log4j2.git;h=01d0f5a ]

          LOG4J2-1854 Support null byte delimiter in GelfLayout.

          Show
          jira-bot ASF subversion and git services added a comment - Commit 01d0f5adee12146356d9574f3de52a273696825e in logging-log4j2's branch refs/heads/master from Mikael Ståldal [ https://git-wip-us.apache.org/repos/asf?p=logging-log4j2.git;h=01d0f5a ] LOG4J2-1854 Support null byte delimiter in GelfLayout.
          Hide
          mikaelstaldal Mikael Ståldal added a comment -

          In Git master.

          Tested with Graylog 2.2.3 GELP TCP input

          Please verify and close.

          Show
          mikaelstaldal Mikael Ståldal added a comment - In Git master. Tested with Graylog 2.2.3 GELP TCP input Please verify and close.
          Hide
          mikaelstaldal Mikael Ståldal added a comment -

          "Fixed" the no compression issue by improved documentation.

          Show
          mikaelstaldal Mikael Ståldal added a comment - "Fixed" the no compression issue by improved documentation.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user xjodoin closed the pull request at:

          https://github.com/apache/logging-log4j2/pull/67

          Show
          githubbot ASF GitHub Bot added a comment - Github user xjodoin closed the pull request at: https://github.com/apache/logging-log4j2/pull/67
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit ffb21ad1651f60d779c4482a462f744ad01a41c6 in logging-log4j2's branch refs/heads/master from Mikael Ståldal
          [ https://git-wip-us.apache.org/repos/asf?p=logging-log4j2.git;h=ffb21ad ]

          LOG4J2-1854 Do not allow compression and null delimiter at the same time

          Show
          jira-bot ASF subversion and git services added a comment - Commit ffb21ad1651f60d779c4482a462f744ad01a41c6 in logging-log4j2's branch refs/heads/master from Mikael Ståldal [ https://git-wip-us.apache.org/repos/asf?p=logging-log4j2.git;h=ffb21ad ] LOG4J2-1854 Do not allow compression and null delimiter at the same time
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit ffb21ad1651f60d779c4482a462f744ad01a41c6 in logging-log4j2's branch refs/heads/LOG4J2-1694 from Mikael Ståldal
          [ https://git-wip-us.apache.org/repos/asf?p=logging-log4j2.git;h=ffb21ad ]

          LOG4J2-1854 Do not allow compression and null delimiter at the same time

          Show
          jira-bot ASF subversion and git services added a comment - Commit ffb21ad1651f60d779c4482a462f744ad01a41c6 in logging-log4j2's branch refs/heads/ LOG4J2-1694 from Mikael Ståldal [ https://git-wip-us.apache.org/repos/asf?p=logging-log4j2.git;h=ffb21ad ] LOG4J2-1854 Do not allow compression and null delimiter at the same time

            People

            • Assignee:
              mikaelstaldal Mikael Ståldal
              Reporter:
              xjodoin Xavier Jodoin
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development