Skip to content

Commit

Permalink
fix: export LogFormatter + update docs (#479)
Browse files Browse the repository at this point in the history
  • Loading branch information
dreamorosi authored Jan 17, 2022
1 parent 4cdaaea commit 7f91566
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions docs/core/logger.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 2 additions & 1 deletion packages/logger/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export * from './helpers';
export * from './Logger';
export * from './middleware';
export * from './middleware';
export * from './formatter';

0 comments on commit 7f91566

Please sign in to comment.