Skip to content

Commit a3b1718

Browse files
Report Correct Mime Type
The HttpAppender of Log4j2 will use the content type reported by the layout as HTTP header. To work well with e.g. Fluent Bit, the reported value was adapted to the actually generated JSON format. Signed-off-by: Karsten Schnitter <[email protected]>
1 parent 2b06d13 commit a3b1718

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cf-java-logging-support-log4j2/src/main/java/com/sap/hcp/cf/log4j2/layout/JsonPatternLayout.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,4 +228,9 @@ private <P extends ComposerBase> void addStacktrace(ObjectComposer<P> oc, LogEve
228228
}
229229
}
230230

231+
@Override
232+
public String getContentType() {
233+
return "application/json";
234+
}
235+
231236
}

0 commit comments

Comments
 (0)