Skip to content

Logging: print message as JSON, instead of wrapping into a string #1508

Closed
@mriccia

Description

@mriccia

Is your feature request related to a problem? Please describe.

The Powertools Logging functionality automatically wraps the messages into string, regardless of whether they are strings or objects.
Looking through the logs with CloudWatch logs is harder with the message being printed as a single string, and printing as JSON will also unlock other options (e.g. using CloudWatch insights to automatically discover fields).

Describe the solution you'd like

Describe alternatives you've considered

Additional context

Metadata

Metadata

Assignees

Labels

priority:2High - core feature or affects 60% of the usersstatus/staged-major-releaseThis change will go with the next major releasev2Version 2

Type

No type

Projects

Status

Shipped

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions