@aws-sdk/middleware-logger 3.222.0 → 3.224.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getLoggerPlugin = exports.loggerMiddlewareOptions = exports.loggerMiddleware = void 0;
|
|
4
4
|
const loggerMiddleware = () => (next, context) => async (args) => {
|
|
5
|
-
const { clientName, commandName, inputFilterSensitiveLog, logger, outputFilterSensitiveLog } = context;
|
|
6
5
|
const response = await next(args);
|
|
6
|
+
const { clientName, commandName, logger, inputFilterSensitiveLog, outputFilterSensitiveLog, dynamoDbDocumentClientOptions = {}, } = context;
|
|
7
|
+
const { overrideInputFilterSensitiveLog, overrideOutputFilterSensitiveLog } = dynamoDbDocumentClientOptions;
|
|
7
8
|
if (!logger) {
|
|
8
9
|
return response;
|
|
9
10
|
}
|
|
@@ -12,8 +13,8 @@ const loggerMiddleware = () => (next, context) => async (args) => {
|
|
|
12
13
|
logger.info({
|
|
13
14
|
clientName,
|
|
14
15
|
commandName,
|
|
15
|
-
input: inputFilterSensitiveLog(args.input),
|
|
16
|
-
output: outputFilterSensitiveLog(outputWithoutMetadata),
|
|
16
|
+
input: (overrideInputFilterSensitiveLog !== null && overrideInputFilterSensitiveLog !== void 0 ? overrideInputFilterSensitiveLog : inputFilterSensitiveLog)(args.input),
|
|
17
|
+
output: (overrideOutputFilterSensitiveLog !== null && overrideOutputFilterSensitiveLog !== void 0 ? overrideOutputFilterSensitiveLog : outputFilterSensitiveLog)(outputWithoutMetadata),
|
|
17
18
|
metadata: $metadata,
|
|
18
19
|
});
|
|
19
20
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export const loggerMiddleware = () => (next, context) => async (args) => {
|
|
2
|
-
const { clientName, commandName, inputFilterSensitiveLog, logger, outputFilterSensitiveLog } = context;
|
|
3
2
|
const response = await next(args);
|
|
3
|
+
const { clientName, commandName, logger, inputFilterSensitiveLog, outputFilterSensitiveLog, dynamoDbDocumentClientOptions = {}, } = context;
|
|
4
|
+
const { overrideInputFilterSensitiveLog, overrideOutputFilterSensitiveLog } = dynamoDbDocumentClientOptions;
|
|
4
5
|
if (!logger) {
|
|
5
6
|
return response;
|
|
6
7
|
}
|
|
@@ -9,8 +10,8 @@ export const loggerMiddleware = () => (next, context) => async (args) => {
|
|
|
9
10
|
logger.info({
|
|
10
11
|
clientName,
|
|
11
12
|
commandName,
|
|
12
|
-
input: inputFilterSensitiveLog(args.input),
|
|
13
|
-
output: outputFilterSensitiveLog(outputWithoutMetadata),
|
|
13
|
+
input: (overrideInputFilterSensitiveLog ?? inputFilterSensitiveLog)(args.input),
|
|
14
|
+
output: (overrideOutputFilterSensitiveLog ?? outputFilterSensitiveLog)(outputWithoutMetadata),
|
|
14
15
|
metadata: $metadata,
|
|
15
16
|
});
|
|
16
17
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/middleware-logger",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.224.0",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
6
6
|
"build:cjs": "tsc -p tsconfig.cjs.json",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"module": "./dist-es/index.js",
|
|
22
22
|
"types": "./dist-types/index.d.ts",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@aws-sdk/types": "3.
|
|
24
|
+
"@aws-sdk/types": "3.224.0",
|
|
25
25
|
"tslib": "^2.3.1"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|