You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@aws-lambda-powertools/logger

Package Overview
Dependencies
Maintainers
3
Versions
110
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-lambda-powertools/logger - npm Package Compare versions

Comparing version

to
2.24.0

2

lib/cjs/formatter/LogFormatter.d.ts
import type { EnvironmentVariablesService } from '../config/EnvironmentVariablesService.js';
import type { LogFormatterOptions } from '../types/formatters.js';
import type { LogAttributes } from '../types/Logger.js';
import type { LogFormatterOptions } from '../types/formatters.js';
import type { UnformattedAttributes } from '../types/logKeys.js';

@@ -5,0 +5,0 @@ import type { LogItem } from './LogItem.js';

@@ -50,5 +50,3 @@ "use strict";

: stack,
cause: error.cause instanceof Error
? this.formatError(error.cause)
: error.cause,
cause: cause instanceof Error ? this.formatError(cause) : cause,
};

@@ -55,0 +53,0 @@ for (const key in error) {

@@ -5,3 +5,3 @@ import { Utility } from '@aws-lambda-powertools/commons';

import type { LogItem } from './formatter/LogItem.js';
import type { ConstructorOptions, InjectLambdaContextOptions, LogAttributes, LogItemExtraInput, LogItemMessage, LogLevel, LoggerInterface } from './types/Logger.js';
import type { ConstructorOptions, InjectLambdaContextOptions, LogAttributes, LoggerInterface, LogItemExtraInput, LogItemMessage, LogLevel } from './types/Logger.js';
import type { LogKeys } from './types/logKeys.js';

@@ -8,0 +8,0 @@ /**

@@ -447,7 +447,3 @@ "use strict";

logger.addContext(context);
let shouldLogEvent = undefined;
if (options && Object.hasOwn(options, 'logEvent')) {
shouldLogEvent = options.logEvent;
}
logger.logEventIfEnabled(event, shouldLogEvent);
logger.logEventIfEnabled(event, options?.logEvent);
} /* v8 ignore stop */

@@ -454,0 +450,0 @@ /**

@@ -5,4 +5,4 @@ "use strict";

const commons_1 = require("@aws-lambda-powertools/commons");
const constants_js_1 = require("../constants.js");
const Logger_js_1 = require("../Logger.js");
const constants_js_1 = require("../constants.js");
/**

@@ -9,0 +9,0 @@ * A Middy.js-compatible middleware to enrich your logs with AWS Lambda context information.

import type { EnvironmentVariablesService } from '../config/EnvironmentVariablesService.js';
import type { LogFormatterOptions } from '../types/formatters.js';
import type { LogAttributes } from '../types/Logger.js';
import type { LogFormatterOptions } from '../types/formatters.js';
import type { UnformattedAttributes } from '../types/logKeys.js';

@@ -5,0 +5,0 @@ import type { LogItem } from './LogItem.js';

@@ -47,5 +47,3 @@ /**

: stack,
cause: error.cause instanceof Error
? this.formatError(error.cause)
: error.cause,
cause: cause instanceof Error ? this.formatError(cause) : cause,
};

@@ -52,0 +50,0 @@ for (const key in error) {

@@ -5,3 +5,3 @@ import { Utility } from '@aws-lambda-powertools/commons';

import type { LogItem } from './formatter/LogItem.js';
import type { ConstructorOptions, InjectLambdaContextOptions, LogAttributes, LogItemExtraInput, LogItemMessage, LogLevel, LoggerInterface } from './types/Logger.js';
import type { ConstructorOptions, InjectLambdaContextOptions, LogAttributes, LoggerInterface, LogItemExtraInput, LogItemMessage, LogLevel } from './types/Logger.js';
import type { LogKeys } from './types/logKeys.js';

@@ -8,0 +8,0 @@ /**

import { Console } from 'node:console';
import { randomInt } from 'node:crypto';
import { Utility, isNullOrUndefined } from '@aws-lambda-powertools/commons';
import { isNullOrUndefined, Utility } from '@aws-lambda-powertools/commons';
import merge from 'lodash.merge';

@@ -441,7 +441,3 @@ import { EnvironmentVariablesService } from './config/EnvironmentVariablesService.js';

logger.addContext(context);
let shouldLogEvent = undefined;
if (options && Object.hasOwn(options, 'logEvent')) {
shouldLogEvent = options.logEvent;
}
logger.logEventIfEnabled(event, shouldLogEvent);
logger.logEventIfEnabled(event, options?.logEvent);
} /* v8 ignore stop */

@@ -448,0 +444,0 @@ /**

import { LOGGER_KEY } from '@aws-lambda-powertools/commons';
import { UncaughtErrorLogMessage } from '../constants.js';
import { Logger } from '../Logger.js';
import { UncaughtErrorLogMessage } from '../constants.js';
/**

@@ -5,0 +5,0 @@ * A Middy.js-compatible middleware to enrich your logs with AWS Lambda context information.

{
"name": "@aws-lambda-powertools/logger",
"version": "2.23.0",
"version": "2.24.0",
"description": "The logging package for the Powertools for AWS Lambda (TypeScript) library",

@@ -28,7 +28,7 @@ "author": {

"dependencies": {
"@aws-lambda-powertools/commons": "^2.23.0",
"@aws-lambda-powertools/commons": "^2.24.0",
"lodash.merge": "^4.6.2"
},
"peerDependencies": {
"@aws-lambda-powertools/jmespath": "2.x",
"@aws-lambda-powertools/jmespath": "2.24.0",
"@middy/core": "4.x || 5.x || 6.x"

@@ -35,0 +35,0 @@ },

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet