Skip to content

Docs: remove logEvent parameter from Logger constructor setting #1814

Closed
@bestickley

Description

@bestickley

Expected Behaviour

The docs state that Logger's constructor accepts a logEvent parameter to control whether or not logger prints event. But when I try to do this I get an error. See screenshot.
image

Current Behaviour

Cannot pass logEvent into constructor of Logger.

Code snippet

const logger = new Logger({
  logEvent: true, // ERROR: Object literal may only specify known properties, and 'logEvent' does not exist in 'ConstructorOptions'
});

Steps to Reproduce

  1. Reproduce code in code snippet above.
  2. See error.

Possible Solution

No response

Powertools for AWS Lambda (TypeScript) version

latest

AWS Lambda function runtime

18.x

Packaging format used

npm

Execution logs

No response

Metadata

Metadata

Assignees

Labels

completedThis item is complete and has been merged/shippeddocumentationImprovements or additions to documentationloggerThis item relates to the Logger Utility

Type

No type

Projects

Status

Shipped

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions