Skip to content

Commit 7f91566

Browse files
authored
fix: export LogFormatter + update docs (#479)
1 parent 4cdaaea commit 7f91566

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

Diff for: docs/core/logger.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -625,13 +625,13 @@ This is how the `MyCompanyLogFormatter` (dummy name) would look like:
625625
=== "utils/formatters/MyCompanyLogFormatter.ts"
626626

627627
```typescript
628-
import { LogFormatter } from "@aws-lambda-powertools/logger";
629-
import { LogAttributes, UnformattedAttributes } from "@aws-lambda-powertools/logger/types";
628+
import { LogFormatter } from '@aws-lambda-powertools/logger';
629+
import { LogAttributes, UnformattedAttributes } from '@aws-lambda-powertools/logger/lib/types';
630630

631631
// Replace this line with your own type
632632
type MyCompanyLog = LogAttributes;
633633

634-
class MyCompanyLogFormatter implements LogFormatter {
634+
class MyCompanyLogFormatter extends LogFormatter {
635635

636636
public formatAttributes(attributes: UnformattedAttributes): MyCompanyLog {
637637
return {

Diff for: packages/logger/src/index.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
export * from './helpers';
22
export * from './Logger';
3-
export * from './middleware';
3+
export * from './middleware';
4+
export * from './formatter';

0 commit comments

Comments
 (0)