Skip to content

Docs: Custom log formatter example does not show source for MyCompanyLogFormatter.ts #1256

Closed
@cromo

Description

@cromo

What were you searching in the docs?

I was reading the docs from top to bottom and came across this since some might want to write string logs instead of using structured logging.

Is this related to an existing documentation section?

https://awslabs.github.io/aws-lambda-powertools-typescript/latest/core/logger/#custom-log-formatter-bring-your-own-formatter

How can we improve?

It looks like the source for `handler.ts` was mistakenly copied into the block below it for `utils/formatters/MyCompanyLogFormatter.ts` instead of showing an implementation of the `LogFormatterInterface`. That block should show how to implement this.

Got a suggestion in mind?

Change the utils/formatters/MyCompanyLogFormatter.ts code block to show an implementation of the LogFormatterInterface as expected; as written the documentation does little more than tell you that custom formatters can be used but not how to make them.

Acknowledgment

  • I understand the final update might be different from my proposed suggestion, or refused.

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentationduplicateThis issue is a duplicate of an existing one

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions