You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/core/logger.md
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -151,7 +151,7 @@ Key | Example
151
151
152
152
const logger = new Logger();
153
153
154
-
class Lambda extends LambdaInterface {
154
+
class Lambda implements LambdaInterface {
155
155
// Decorate your handler class method
156
156
@logger.injectLambdaContext()
157
157
public async handler(_event: any, _context: any): Promise<void> {
@@ -589,7 +589,7 @@ For example, by setting the "sample rate" to `0.5`, roughly 50% of your lambda i
589
589
590
590
### Custom Log formatter (Bring Your Own Formatter)
591
591
592
-
You can customize the structure (keys and values) of your log items by passing a custom log formatter, an object that extends the `LogFormatter` abstract class.
592
+
You can customize the structure (keys and values) of your log items by passing a custom log formatter, an object that implements the `LogFormatter` abstract class.
593
593
594
594
=== "handler.ts"
595
595
@@ -631,7 +631,7 @@ This is how the `MyCompanyLogFormatter` (dummy name) would look like:
631
631
// Replace this line with your own type
632
632
type MyCompanyLog = LogAttributes;
633
633
634
-
class MyCompanyLogFormatter extends LogFormatter {
634
+
class MyCompanyLogFormatter implements LogFormatter {
635
635
636
636
public formatAttributes(attributes: UnformattedAttributes): MyCompanyLog {
0 commit comments