-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fail fast and loud for invalid GELF messages (#3972)
* Fail fast and loud for invalid GELF messages Instead of waiting for a later stage and "silently" dropping (logged on DEBUG) invalid messages, `GelfCodec` now actively checks for the existence and validity of mandatory GELF message fields (such as "version", "host", "short_message", and "timestamp", according to the GELF spec). Refs http://docs.graylog.org/en/2.2/pages/gelf.html Fixes #3970 * Don't check "version" field for backward-compatibility There are still many GELF client libraries out there using either "1.0" or no value at all for the GELF "version" field. * Make GELF validation more lenient * Add test for minimal GELF messages * Fix logic for validating "host" message field
- Loading branch information
Showing
2 changed files
with
258 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters