Skip to content

Commit

Permalink
refactor(logger): template literal instead of node:util format (#2283)
Browse files Browse the repository at this point in the history
Co-authored-by: Andrea Amorosi <dreamorosi@gmail.com>
  • Loading branch information
NimmLor and dreamorosi authored Mar 26, 2024
1 parent 0771fd5 commit 2383c14
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions packages/logger/src/Logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { Utility } from '@aws-lambda-powertools/commons';
import type { HandlerMethodDecorator } from '@aws-lambda-powertools/commons/types';
import type { Context, Handler } from 'aws-lambda';
import merge from 'lodash.merge';
import { format } from 'node:util';
import { Console } from 'node:console';
import { randomInt } from 'node:crypto';
import { EnvironmentVariablesService } from './config/EnvironmentVariablesService.js';
Expand Down Expand Up @@ -586,11 +585,7 @@ class Logger extends Utility implements LoggerInterface {
this.logLevel > this.logLevelThresholds[selectedLogLevel]
) {
this.warn(
format(
`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.`,
selectedLogLevel,
awsLogLevel
)
`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.`
);
}

Expand Down

0 comments on commit 2383c14

Please sign in to comment.