-
Notifications
You must be signed in to change notification settings - Fork 639
Closed
Description
Describe the bug
After switching from 4.1.1 to 4.1.2 AWSLambdaUtils divides input JSON into multiple log entries preventing AWS Cloudwatch from formatting it properly and causing a huge amount of logs.
In 4.1.1 it logged the entire input in a single log entry and AWS CloudWatch formatted and colored it, while now we get one JSON line per log entry.
Line 116 in f0ae10f
| logger.info("Received: " + mask(new String(payload, StandardCharsets.UTF_8))); |
It's probably caused by SerializationFeature.INDENT_OUTPUT in the new JsonMasker class.
Line 56 in f0ae10f
| this.mapper = new JacksonMapper(new ObjectMapper().enable(SerializationFeature.INDENT_OUTPUT)); |
Can you remove this feature / give an option to disable it or/and at least skip processing by JsonMasker when keysToMask is empty?
Sample
Any AWS Lambda application that accepts JSON input