Skip to content

Commit d57ab6f

Browse files
authored
Merge pull request #6 from alletrof/develop
fix(GraylogHTTPPlugin): send 'full_message' when the field exists
2 parents 3c90f82 + 1daf2a7 commit d57ab6f

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/main/java/com/plugin/HttpOutput.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,12 @@ public void write(Message msg) throws Exception {
9898

9999
Map<String, Object> payload = new HashMap<>();
100100
payload.put("intake_key", this.intake_key);
101-
payload.put("json", msg.getMessage());
101+
if (msg.hasField("full_message")) {
102+
payload.put("json", msg.getFieldAs(String.class, "full_message"));
103+
}
104+
else {
105+
payload.put("json", msg.getMessage());
106+
}
102107

103108
this.executeRequest(
104109
RequestBody.create(

0 commit comments

Comments
 (0)