Skip to content

Commit 006c0d8

Browse files
authored
Enabled CloudWatch Embedded Metric Format Logging (#224)
1 parent d6c12d5 commit 006c0d8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/main/java/software/amazon/cloudformation/loggers/CloudWatchLogPublisher.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ protected void publishMessage(final String message) {
6969
assert cloudWatchLogsClient != null : "cloudWatchLogsClient was not initialised. "
7070
+ "You must call refreshClient() first.";
7171
PutLogEventsResponse putLogEventsResponse = cloudWatchLogsClient.putLogEvents(PutLogEventsRequest.builder()
72+
.overrideConfiguration(builder -> builder.putHeader("x-amzn-logs-format", "json/emf"))
7273
.sequenceToken(nextSequenceToken).logGroupName(logGroupName).logStreamName(logStreamName)
7374
.logEvents(InputLogEvent.builder().message(message).timestamp(new Date().getTime()).build()).build());
7475

0 commit comments

Comments
 (0)