Skip to content

4.1.2 Broken input logging #1157

@franczakr

Description

@franczakr

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.

It's probably caused by SerializationFeature.INDENT_OUTPUT in the new JsonMasker class.

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions