Skip to content

Bug: incorrect log level in CloudWatch #378

Closed
@saragerion

Description

@saragerion

Bug description

Right now when printing log items, the log level (DEBUG, INFO, WARN, ERROR) is correctly state in the structured log JSON, but in cloudwatch they are processed all as INFO logs.

Expected Behavior

Each log item in CloudWatch is processed using the correct logging level.

Current Behavior

All log items have an INFO log level in CW.

Possible Solution

Use the proper console method (console.debug, console.info, console.warn, console.error).

Steps to Reproduce

N/A

Environment

  • Powertools version used: main branch
  • Packaging format (Layers, npm): NPM
  • AWS Lambda function runtime: all
  • Debugging logs: N/A

Related issues, RFCs

N/A

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingcompletedThis item is complete and has been merged/shippedloggerThis item relates to the Logger Utility

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions