Skip to content

Improv: Separate module logger from code logger #16

Closed
@heitorlessa

Description

@heitorlessa

From discussion with @jfuss, it'd best to create a separate environment variable to control powertools logging level as opposed to LOG_LEVEL.

While LOG_LEVEL simplifies DX it does raise concerns if you want to isolate logging level to your Lambda function only.

Convo: aws-powertools/powertools-lambda#15 (comment)


Changes

  • Create a POWERTOOLS_LOG_LEVEL environment variable
  • Update all modules to use POWERTOOLS_LOG_LEVEL
  • Use a Null Handler to cut noise in customers' logging
  • Create top-level logger aws-lambda-powertools
  • Update docs to reflect the change
  • Accept an existing logger in logger setup
  • Refactor Lambda Logging module to prevent root logging changes

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions