Skip to content

Commit 0781a47

Browse files
authored
fix(logger): change logging to use stdout (#748)
* fix: moved to stdout, unit tests wip * feat: adapted e2e tests - passing * feat: wrote unit tests * lint + cleanup * chore: updated commons unit tests
1 parent 95d7b6f commit 0781a47

File tree

9 files changed

+147
-143
lines changed

9 files changed

+147
-143
lines changed

packages/commons/tests/unit/InvocationLogs.test.ts

+8-16
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
import { InvocationLogs, LEVEL } from '../utils/InvocationLogs';
99

1010
const exampleLogs = `START RequestId: c6af9ac6-7b61-11e6-9a41-93e812345678 Version: $LATEST
11-
2022-01-27T16:04:39.323Z\tc6af9ac6-7b61-11e6-9a41-93e812345678\tDEBUG\t{"cold_start":true,"function_arn":"arn:aws:lambda:eu-west-1:561912387782:function:loggerMiddyStandardFeatures-c555a2ec-1121-4586-9c04-185ab36ea34c","function_memory_size":128,"function_name":"loggerMiddyStandardFeatures-c555a2ec-1121-4586-9c04-185ab36ea34c","function_request_id":"7f586697-238a-4c3b-9250-a5f057c1119c","level":"DEBUG","message":"This is a DEBUG log but contains the word INFO some context and persistent key","service":"logger-e2e-testing","timestamp":"2022-01-27T16:04:39.323Z","persistentKey":"works"}
12-
2022-01-27T16:04:39.323Z\tc6af9ac6-7b61-11e6-9a41-93e812345678\tINFO\t{"cold_start":true,"function_arn":"arn:aws:lambda:eu-west-1:561912387782:function:loggerMiddyStandardFeatures-c555a2ec-1121-4586-9c04-185ab36ea34c","function_memory_size":128,"function_name":"loggerMiddyStandardFeatures-c555a2ec-1121-4586-9c04-185ab36ea34c","function_request_id":"7f586697-238a-4c3b-9250-a5f057c1119c","level":"INFO","message":"This is an INFO log with some context","service":"logger-e2e-testing","timestamp":"2022-01-27T16:04:39.323Z","persistentKey":"works","additionalKey":"additionalValue"}
13-
2022-01-27T16:04:39.323Z\tc6af9ac6-7b61-11e6-9a41-93e812345678\tINFO\t{"cold_start":true,"function_arn":"arn:aws:lambda:eu-west-1:561912387782:function:loggerMiddyStandardFeatures-c555a2ec-1121-4586-9c04-185ab36ea34c","function_memory_size":128,"function_name":"loggerMiddyStandardFeatures-c555a2ec-1121-4586-9c04-185ab36ea34c","function_request_id":"7f586697-238a-4c3b-9250-a5f057c1119c","level":"INFO","message":"This is a second INFO log with some context","service":"logger-e2e-testing","timestamp":"2022-01-27T16:04:39.323Z","persistentKey":"works","additionalKey":"additionalValue"}
14-
2022-01-27T16:04:39.323Z\tc6af9ac6-7b61-11e6-9a41-93e812345678\tERROR\t{"cold_start":true,"function_arn":"arn:aws:lambda:eu-west-1:561912387782:function:loggerMiddyStandardFeatures-c555a2ec-1121-4586-9c04-185ab36ea34c","function_memory_size":128,"function_name":"loggerMiddyStandardFeatures-c555a2ec-1121-4586-9c04-185ab36ea34c","function_request_id":"7f586697-238a-4c3b-9250-a5f057c1119c","level":"ERROR","message":"There was an error","service":"logger-e2e-testing","timestamp":"2022-01-27T16:04:39.323Z","persistentKey":"works","error":{"name":"Error","location":"/var/task/index.js:2778","message":"you cannot prevent this","stack":"Error: you cannot prevent this\\n at testFunction (/var/task/index.js:2778:11)\\n at runRequest (/var/task/index.js:2314:36)"}}
11+
{"cold_start":true,"function_arn":"arn:aws:lambda:eu-west-1:561912387782:function:loggerMiddyStandardFeatures-c555a2ec-1121-4586-9c04-185ab36ea34c","function_memory_size":128,"function_name":"loggerMiddyStandardFeatures-c555a2ec-1121-4586-9c04-185ab36ea34c","function_request_id":"7f586697-238a-4c3b-9250-a5f057c1119c","level":"DEBUG","message":"This is a DEBUG log but contains the word INFO some context and persistent key","service":"logger-e2e-testing","timestamp":"2022-01-27T16:04:39.323Z","persistentKey":"works"}
12+
{"cold_start":true,"function_arn":"arn:aws:lambda:eu-west-1:561912387782:function:loggerMiddyStandardFeatures-c555a2ec-1121-4586-9c04-185ab36ea34c","function_memory_size":128,"function_name":"loggerMiddyStandardFeatures-c555a2ec-1121-4586-9c04-185ab36ea34c","function_request_id":"7f586697-238a-4c3b-9250-a5f057c1119c","level":"INFO","message":"This is an INFO log with some context","service":"logger-e2e-testing","timestamp":"2022-01-27T16:04:39.323Z","persistentKey":"works","additionalKey":"additionalValue"}
13+
{"cold_start":true,"function_arn":"arn:aws:lambda:eu-west-1:561912387782:function:loggerMiddyStandardFeatures-c555a2ec-1121-4586-9c04-185ab36ea34c","function_memory_size":128,"function_name":"loggerMiddyStandardFeatures-c555a2ec-1121-4586-9c04-185ab36ea34c","function_request_id":"7f586697-238a-4c3b-9250-a5f057c1119c","level":"INFO","message":"This is a second INFO log with some context","service":"logger-e2e-testing","timestamp":"2022-01-27T16:04:39.323Z","persistentKey":"works","additionalKey":"additionalValue"}
14+
{"cold_start":true,"function_arn":"arn:aws:lambda:eu-west-1:561912387782:function:loggerMiddyStandardFeatures-c555a2ec-1121-4586-9c04-185ab36ea34c","function_memory_size":128,"function_name":"loggerMiddyStandardFeatures-c555a2ec-1121-4586-9c04-185ab36ea34c","function_request_id":"7f586697-238a-4c3b-9250-a5f057c1119c","level":"ERROR","message":"There was an error","service":"logger-e2e-testing","timestamp":"2022-01-27T16:04:39.323Z","persistentKey":"works","error":{"name":"Error","location":"/var/task/index.js:2778","message":"you cannot prevent this","stack":"Error: you cannot prevent this\\n at testFunction (/var/task/index.js:2778:11)\\n at runRequest (/var/task/index.js:2314:36)"}}
1515
END RequestId: c6af9ac6-7b61-11e6-9a41-93e812345678
1616
REPORT RequestId: c6af9ac6-7b61-11e6-9a41-93e812345678\tDuration: 2.16 ms\tBilled Duration: 3 ms\tMemory Size: 128 MB\tMax Memory Used: 57 MB\t`;
1717

@@ -104,13 +104,10 @@ describe('getFunctionLogs()', () => {
104104

105105
describe('parseFunctionLog()', () => {
106106
test('it should return object with the correct values based on the given log', () => {
107-
const rawLogStr = '2022-01-27T16:04:39.323Z\tc6af9ac6-7b61-11e6-9a41-93e812345678\tDEBUG\t{"cold_start":true,"function_arn":"arn:aws:lambda:eu-west-1:561912387782:function:loggerMiddyStandardFeatures-c555a2ec-1121-4586-9c04-185ab36ea34c","function_memory_size":128,"function_name":"loggerMiddyStandardFeatures-c555a2ec-1121-4586-9c04-185ab36ea34c","function_request_id":"7f586697-238a-4c3b-9250-a5f057c1119c","level":"DEBUG","message":"This is a DEBUG log but contains the word INFO some context and persistent key","service":"logger-e2e-testing","timestamp":"2022-01-27T16:04:39.323Z","persistentKey":"works"}';
107+
const rawLogStr = '{"cold_start":true,"function_arn":"arn:aws:lambda:eu-west-1:561912387782:function:loggerMiddyStandardFeatures-c555a2ec-1121-4586-9c04-185ab36ea34c","function_memory_size":128,"function_name":"loggerMiddyStandardFeatures-c555a2ec-1121-4586-9c04-185ab36ea34c","function_request_id":"7f586697-238a-4c3b-9250-a5f057c1119c","level":"DEBUG","message":"This is a DEBUG log but contains the word INFO some context and persistent key","service":"logger-e2e-testing","timestamp":"2022-01-27T16:04:39.323Z","persistentKey":"works"}';
108108

109109
const logObj = InvocationLogs.parseFunctionLog(rawLogStr);
110-
expect(logObj.timestamp).toBe('2022-01-27T16:04:39.323Z');
111-
expect(logObj.invocationId).toBe('c6af9ac6-7b61-11e6-9a41-93e812345678');
112-
expect(logObj.logLevel).toBe(LEVEL.DEBUG);
113-
expect(logObj.logObject).toStrictEqual({
110+
expect(logObj).toStrictEqual({
114111
cold_start: true,
115112
function_arn: 'arn:aws:lambda:eu-west-1:561912387782:function:loggerMiddyStandardFeatures-c555a2ec-1121-4586-9c04-185ab36ea34c',
116113
function_memory_size: 128,
@@ -125,14 +122,9 @@ describe('parseFunctionLog()', () => {
125122
});
126123

127124
test('it should throw an error if receive incorrect formatted raw log string', () => {
128-
const noTabString = 'no-tab-character';
125+
const notJSONstring = 'not-json-string';
129126
expect(() => {
130-
InvocationLogs.parseFunctionLog(noTabString);
131-
}).toThrow(Error);
132-
133-
const missSomeElements = '2022-01-27T16:04:39.323Z\tc6af9ac6-7b61-11e6-9a41-93e812345678\tDEBUG\t';
134-
expect(() => {
135-
InvocationLogs.parseFunctionLog(missSomeElements);
127+
InvocationLogs.parseFunctionLog(notJSONstring);
136128
}).toThrow(Error);
137129
});
138130
});

packages/commons/tests/utils/InvocationLogs.ts

+23-31
Original file line numberDiff line numberDiff line change
@@ -8,32 +8,35 @@ export enum LEVEL {
88
ERROR = 'ERROR',
99
}
1010

11-
export type FunctionLog = {
12-
timestamp: string
13-
invocationId: string
14-
logLevel: LEVEL
15-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
16-
logObject: {[key: string]: any}
11+
export type ErrorField = {
12+
name: string
13+
message: string
14+
stack: string
1715
};
16+
17+
export type FunctionLog = {
18+
level: LEVEL
19+
error: ErrorField
20+
} & { [key: string]: unknown };
21+
1822
export class InvocationLogs {
1923
public static LEVEL = LEVEL;
2024

2125
/**
2226
* Array of logs from invocation.
2327
*
2428
* The first element is START, and the last two elements are END, and REPORT.
25-
* In each log, each content is separated by '\t'
2629
* [
2730
* 'START RequestId: c6af9ac6-7b61-11e6-9a41-93e812345678 Version: $LATEST',
28-
* '2022-01-27T16:04:39.323Z\tc6af9ac6-7b61-11e6-9a41-93e812345678\tINFO\t{"cold_start":true,"function_arn":"arn:aws:lambda:eu-west-1:561912387782:function:loggerMiddyStandardFeatures-c555a2ec-1121-4586-9c04-185ab36ea34c","function_memory_size":128,"function_name":"loggerMiddyStandardFeatures-c555a2ec-1121-4586-9c04-185ab36ea34c","function_request_id":"7f586697-238a-4c3b-9250-a5f057c1119c","level":"INFO","message":"This is an INFO log with some context and persistent key","service":"logger-e2e-testing","timestamp":"2022-01-27T16:04:39.323Z","persistentKey":"works"}',
29-
* '2022-01-27T16:04:39.323Z\tc6af9ac6-7b61-11e6-9a41-93e812345678\tINFO\t{"cold_start":true,"function_arn":"arn:aws:lambda:eu-west-1:561912387782:function:loggerMiddyStandardFeatures-c555a2ec-1121-4586-9c04-185ab36ea34c","function_memory_size":128,"function_name":"loggerMiddyStandardFeatures-c555a2ec-1121-4586-9c04-185ab36ea34c","function_request_id":"7f586697-238a-4c3b-9250-a5f057c1119c","level":"INFO","message":"This is an INFO log with some context","service":"logger-e2e-testing","timestamp":"2022-01-27T16:04:39.323Z","persistentKey":"works","additionalKey":"additionalValue"}',
30-
* '2022-01-27T16:04:39.323Z\tc6af9ac6-7b61-11e6-9a41-93e812345678\tERROR\t{"cold_start":true,"function_arn":"arn:aws:lambda:eu-west-1:561912387782:function:loggerMiddyStandardFeatures-c555a2ec-1121-4586-9c04-185ab36ea34c","function_memory_size":128,"function_name":"loggerMiddyStandardFeatures-c555a2ec-1121-4586-9c04-185ab36ea34c","function_request_id":"7f586697-238a-4c3b-9250-a5f057c1119c","level":"ERROR","message":"There was an error","service":"logger-e2e-testing","timestamp":"2022-01-27T16:04:39.323Z","persistentKey":"works","error":{"name":"Error","location":"/var/task/index.js:2778","message":"you cannot prevent this","stack":"Error: you cannot prevent this\\n at testFunction (/var/task/index.js:2778:11)\\n at runRequest (/var/task/index.js:2314:36)"}}',
31+
* '{"cold_start":true,"function_arn":"arn:aws:lambda:eu-west-1:561912387782:function:loggerMiddyStandardFeatures-c555a2ec-1121-4586-9c04-185ab36ea34c","function_memory_size":128,"function_name":"loggerMiddyStandardFeatures-c555a2ec-1121-4586-9c04-185ab36ea34c","function_request_id":"7f586697-238a-4c3b-9250-a5f057c1119c","level":"INFO","message":"This is an INFO log with some context and persistent key","service":"logger-e2e-testing","timestamp":"2022-01-27T16:04:39.323Z","persistentKey":"works"}',
32+
* '{"cold_start":true,"function_arn":"arn:aws:lambda:eu-west-1:561912387782:function:loggerMiddyStandardFeatures-c555a2ec-1121-4586-9c04-185ab36ea34c","function_memory_size":128,"function_name":"loggerMiddyStandardFeatures-c555a2ec-1121-4586-9c04-185ab36ea34c","function_request_id":"7f586697-238a-4c3b-9250-a5f057c1119c","level":"INFO","message":"This is an INFO log with some context","service":"logger-e2e-testing","timestamp":"2022-01-27T16:04:39.323Z","persistentKey":"works","additionalKey":"additionalValue"}',
33+
* '{"cold_start":true,"function_arn":"arn:aws:lambda:eu-west-1:561912387782:function:loggerMiddyStandardFeatures-c555a2ec-1121-4586-9c04-185ab36ea34c","function_memory_size":128,"function_name":"loggerMiddyStandardFeatures-c555a2ec-1121-4586-9c04-185ab36ea34c","function_request_id":"7f586697-238a-4c3b-9250-a5f057c1119c","level":"ERROR","message":"There was an error","service":"logger-e2e-testing","timestamp":"2022-01-27T16:04:39.323Z","persistentKey":"works","error":{"name":"Error","location":"/var/task/index.js:2778","message":"you cannot prevent this","stack":"Error: you cannot prevent this\\n at testFunction (/var/task/index.js:2778:11)\\n at runRequest (/var/task/index.js:2314:36)"}}',
3134
* 'END RequestId: c6af9ac6-7b61-11e6-9a41-93e812345678',
3235
* 'REPORT RequestId: c6af9ac6-7b61-11e6-9a41-93e812345678\tDuration: 2.16 ms\tBilled Duration: 3 ms\tMemory Size: 128 MB\tMax Memory Used: 57 MB\t',
3336
* ]
3437
* See https://docs.aws.amazon.com/lambda/latest/dg/nodejs-logging.html for details
3538
*/
36-
private logs: string[];
39+
private logs: string[];
3740

3841
public constructor(logResult: string) {
3942
const rawLog = Buffer.from(logResult, 'base64').toString('utf-8').trim();
@@ -43,48 +46,37 @@ export class InvocationLogs {
4346
/**
4447
* Find all functional logs whether it contains a given text
4548
* @param text
46-
* @param log level to filter
49+
* @param levelToFilter level to filter
4750
* @returns
4851
*/
4952
public doesAnyFunctionLogsContains(text: string, levelToFilter?: LEVEL): boolean {
5053
const filteredLogs = this.getFunctionLogs(levelToFilter)
5154
.filter(log => log.includes(text));
52-
55+
5356
return filteredLogs.length > 0;
5457
}
5558

5659
/**
5760
* Return only logs from function, exclude START, END, and REPORT generated by Lambda service
58-
* @param log level to filter
61+
* @param levelToFilter level to filter
5962
* @returns Array of function logs
6063
*/
6164
public getFunctionLogs(levelToFilter?: LEVEL): string[] {
6265
let filteredLogs = this.logs.slice(1, -2);
6366

6467
if (levelToFilter) {
65-
filteredLogs = filteredLogs.filter(log => log.split('\t')[2] == levelToFilter);
66-
}
67-
68+
filteredLogs = filteredLogs.filter((log) => JSON.parse(log).level == levelToFilter);
69+
}
70+
6871
return filteredLogs;
6972
}
7073

7174
/**
72-
* Each of log message contains 4 elements, separted by tabs
73-
* 1. Timestamp (e.g. 2022-01-27T16:04:39.323Z )
74-
* 2. Invocation id (e.g. tafb6de1a-48f8-4fbb-ad72-23a4f0c2924c)
75-
* 3. Log level (e.g. INFO)
76-
* 4. Log object (e.g. {\"cold_start\":true, ..})
77-
* @param message
75+
* Each of log message contains a JSON with the structured Log object (e.g. {\"cold_start\":true, ..})
76+
* @param log
7877
*/
7978
public static parseFunctionLog(log: string): FunctionLog {
80-
const elements = log.split('\t');
81-
82-
return {
83-
timestamp: elements[0],
84-
invocationId: elements[1],
85-
logLevel: <LEVEL> elements[2],
86-
logObject: JSON.parse(elements[3]),
87-
};
79+
return JSON.parse(log);
8880
}
8981

9082
}

packages/logger/src/Logger.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { Console } from 'console';
12
import type { Context } from 'aws-lambda';
23
import { Utility } from '@aws-lambda-powertools/commons';
34
import { LogFormatterInterface, PowertoolLogFormatter } from './formatter';
@@ -107,6 +108,8 @@ import type {
107108
*/
108109
class Logger extends Utility implements ClassThatLogs {
109110

111+
private console = new Console({ stdout: process.stdout, stderr: process.stderr });
112+
110113
private customConfigService?: ConfigServiceInterface;
111114

112115
private static readonly defaultLogLevel: LogLevel = 'INFO';
@@ -448,7 +451,7 @@ class Logger extends Utility implements ClassThatLogs {
448451

449452
const consoleMethod = logLevel.toLowerCase() as keyof ClassThatLogs;
450453

451-
console[consoleMethod](JSON.stringify(log.getAttributes(), this.removeCircularDependencies()));
454+
this.console[consoleMethod](JSON.stringify(log.getAttributes(), this.removeCircularDependencies()));
452455
}
453456

454457
/**

packages/logger/tests/e2e/basicFeatures.middy.test.ts

+8-8
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@
1010
import path from 'path';
1111
import { randomUUID } from 'crypto';
1212
import { App, Stack } from 'aws-cdk-lib';
13-
import {
13+
import {
1414
createStackWithLambdaFunction,
1515
generateUniqueName,
1616
invokeFunction,
1717
isValidRuntimeKey
1818
} from '../../../commons/tests/utils/e2eUtils';
1919
import { InvocationLogs } from '../../../commons/tests/utils/InvocationLogs';
2020
import { deployStack, destroyStack } from '../../../commons/tests/utils/cdk-cli';
21-
import {
21+
import {
2222
RESOURCE_NAME_PREFIX,
2323
STACK_OUTPUT_LOG_GROUP,
2424
SETUP_TIMEOUT,
@@ -67,8 +67,8 @@ describe(`logger E2E tests basic functionalities (middy) for runtime: ${runtime}
6767
UUID: uuid,
6868

6969
// Text to be used by Logger in the Lambda function
70-
PERSISTENT_KEY,
71-
PERSISTENT_VALUE,
70+
PERSISTENT_KEY,
71+
PERSISTENT_VALUE,
7272
SINGLE_LOG_ITEM_KEY,
7373
SINGLE_LOG_ITEM_VALUE,
7474
ERROR_MSG,
@@ -84,7 +84,7 @@ describe(`logger E2E tests basic functionalities (middy) for runtime: ${runtime}
8484
invocationLogs = await invokeFunction(functionName, 2, 'SEQUENTIAL');
8585

8686
console.log('logGroupName', logGroupName);
87-
87+
8888
}, SETUP_TIMEOUT);
8989

9090
describe('Log level filtering', () => {
@@ -148,7 +148,7 @@ describe(`logger E2E tests basic functionalities (middy) for runtime: ${runtime}
148148
it('should log additional keys and value only once', async () => {
149149
const logMessages = invocationLogs[0].getFunctionLogs()
150150
.filter(message => message.includes(`"${SINGLE_LOG_ITEM_KEY}":"${SINGLE_LOG_ITEM_VALUE}"`));
151-
151+
152152
expect(logMessages).toHaveLength(1);
153153
}, TEST_CASE_TIMEOUT);
154154
});
@@ -157,10 +157,10 @@ describe(`logger E2E tests basic functionalities (middy) for runtime: ${runtime}
157157
it('should log additional keys and value only once', async () => {
158158
const logMessages = invocationLogs[0].getFunctionLogs(LEVEL.ERROR)
159159
.filter(message => message.includes(ERROR_MSG));
160-
160+
161161
expect(logMessages).toHaveLength(1);
162162

163-
const { logObject } = InvocationLogs.parseFunctionLog(logMessages[0]);
163+
const logObject = InvocationLogs.parseFunctionLog(logMessages[0]);
164164
const errorObj = logObject.error;
165165

166166
expect(errorObj.name).toBe('Error');

packages/logger/tests/e2e/childLogger.manual.test.ts

+8-8
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,22 @@
1010
import path from 'path';
1111
import { randomUUID } from 'crypto';
1212
import { App, Stack } from 'aws-cdk-lib';
13-
import {
13+
import {
1414
createStackWithLambdaFunction,
1515
generateUniqueName,
1616
invokeFunction,
1717
isValidRuntimeKey
1818
} from '../../../commons/tests/utils/e2eUtils';
1919
import { InvocationLogs } from '../../../commons/tests/utils/InvocationLogs';
2020
import { deployStack, destroyStack } from '../../../commons/tests/utils/cdk-cli';
21-
import {
21+
import {
2222
RESOURCE_NAME_PREFIX,
2323
STACK_OUTPUT_LOG_GROUP,
2424
SETUP_TIMEOUT,
2525
TEST_CASE_TIMEOUT,
2626
TEARDOWN_TIMEOUT
2727
} from './constants';
28-
28+
2929
const runtime: string = process.env.RUNTIME || 'nodejs14x';
3030

3131
if (!isValidRuntimeKey(runtime)) {
@@ -54,7 +54,7 @@ describe(`logger E2E tests child logger functionalities (manual) for runtime: ${
5454
let invocationLogs: InvocationLogs[];
5555

5656
beforeAll(async () => {
57-
57+
5858
// Create and deploy a stack with AWS CDK
5959
stack = createStackWithLambdaFunction({
6060
app: integTestApp,
@@ -67,8 +67,8 @@ describe(`logger E2E tests child logger functionalities (manual) for runtime: ${
6767
UUID: uuid,
6868

6969
// Text to be used by Logger in the Lambda function
70-
PARENT_PERSISTENT_KEY,
71-
PARENT_PERSISTENT_VALUE,
70+
PARENT_PERSISTENT_KEY,
71+
PARENT_PERSISTENT_VALUE,
7272
PARENT_LOG_MSG,
7373
CHILD_LOG_MSG,
7474
CHILD_LOG_LEVEL,
@@ -83,7 +83,7 @@ describe(`logger E2E tests child logger functionalities (manual) for runtime: ${
8383
invocationLogs = await invokeFunction(functionName, 1);
8484

8585
console.log('logGroupName', logGroupName);
86-
86+
8787
}, SETUP_TIMEOUT);
8888

8989
const getAllChildLogs = (): string[] => invocationLogs[0].getFunctionLogs()
@@ -111,7 +111,7 @@ describe(`logger E2E tests child logger functionalities (manual) for runtime: ${
111111
// Only parent has injected context.
112112
const allChildLogs = getAllChildLogs();
113113

114-
for ( const log of allChildLogs ) {
114+
for (const log of allChildLogs) {
115115
expect(log).not.toContain('function_arn');
116116
expect(log).not.toContain('function_memory_size');
117117
expect(log).not.toContain('function_name');

0 commit comments

Comments
 (0)