diff --git a/docs/core/logger.md b/docs/core/logger.md index 3193357f6a..bb7b3dd432 100644 --- a/docs/core/logger.md +++ b/docs/core/logger.md @@ -625,13 +625,13 @@ This is how the `MyCompanyLogFormatter` (dummy name) would look like: === "utils/formatters/MyCompanyLogFormatter.ts" ```typescript - import { LogFormatter } from "@aws-lambda-powertools/logger"; - import { LogAttributes, UnformattedAttributes } from "@aws-lambda-powertools/logger/types"; + import { LogFormatter } from '@aws-lambda-powertools/logger'; + import { LogAttributes, UnformattedAttributes } from '@aws-lambda-powertools/logger/lib/types'; // Replace this line with your own type type MyCompanyLog = LogAttributes; - class MyCompanyLogFormatter implements LogFormatter { + class MyCompanyLogFormatter extends LogFormatter { public formatAttributes(attributes: UnformattedAttributes): MyCompanyLog { return { diff --git a/packages/logger/src/index.ts b/packages/logger/src/index.ts index d56574a719..577d19f6d5 100644 --- a/packages/logger/src/index.ts +++ b/packages/logger/src/index.ts @@ -1,3 +1,4 @@ export * from './helpers'; export * from './Logger'; -export * from './middleware'; \ No newline at end of file +export * from './middleware'; +export * from './formatter'; \ No newline at end of file