Skip to content

Commit 2383c14

Browse files
NimmLordreamorosi
andauthored
refactor(logger): template literal instead of node:util format (#2283)
Co-authored-by: Andrea Amorosi <[email protected]>
1 parent 0771fd5 commit 2383c14

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

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

+1-6
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { Utility } from '@aws-lambda-powertools/commons';
22
import type { HandlerMethodDecorator } from '@aws-lambda-powertools/commons/types';
33
import type { Context, Handler } from 'aws-lambda';
44
import merge from 'lodash.merge';
5-
import { format } from 'node:util';
65
import { Console } from 'node:console';
76
import { randomInt } from 'node:crypto';
87
import { EnvironmentVariablesService } from './config/EnvironmentVariablesService.js';
@@ -586,11 +585,7 @@ class Logger extends Utility implements LoggerInterface {
586585
this.logLevel > this.logLevelThresholds[selectedLogLevel]
587586
) {
588587
this.warn(
589-
format(
590-
`Current log level (%s) does not match AWS Lambda Advanced Logging Controls minimum log level (%s). This can lead to data loss, consider adjusting them.`,
591-
selectedLogLevel,
592-
awsLogLevel
593-
)
588+
`Current log level (${selectedLogLevel}) does not match AWS Lambda Advanced Logging Controls minimum log level (${awsLogLevel}). This can lead to data loss, consider adjusting them.`
594589
);
595590
}
596591

0 commit comments

Comments
 (0)