Skip to content

Commit befa81d

Browse files
authored
feat(examples): update default logging settings in SAM template (#336)
1 parent 39c235d commit befa81d

File tree

4 files changed

+147
-81
lines changed

4 files changed

+147
-81
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,7 @@
2727
# Node version
2828
.nvmrc
2929

30-
*.rollup.cache
30+
*.rollup.cache
31+
32+
# Durable executions local emulator files
33+
**/.durable-executions-local/

packages/aws-durable-execution-sdk-js-examples/scripts/generate-sam-template.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,8 @@ function createFunctionResource(filename, skipVerboseLogging = false) {
122122
Environment: {
123123
Variables: {
124124
AWS_ENDPOINT_URL_LAMBDA: "http://host.docker.internal:5000",
125-
DURABLE_VERBOSE_MODE: skipVerboseLogging ? "false" : "true",
125+
DURABLE_VERBOSE_MODE: "false",
126+
DURABLE_EXAMPLES_VERBOSE: "true",
126127
},
127128
},
128129
},

packages/aws-durable-execution-sdk-js-examples/src/__tests__/generate-sam-template.test.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,18 +48,10 @@ describe("generate-sam-template", () => {
4848
test("includes required environment variables", () => {
4949
const resource = createFunctionResource("hello-world");
5050

51-
expect(resource.Properties.Environment.Variables).toEqual({
52-
AWS_ENDPOINT_URL_LAMBDA: "http://host.docker.internal:5000",
53-
DURABLE_VERBOSE_MODE: "true",
54-
});
55-
});
56-
57-
test("disables verbose logging when skipVerboseLogging is true", () => {
58-
const resource = createFunctionResource("hello-world", true);
59-
6051
expect(resource.Properties.Environment.Variables).toEqual({
6152
AWS_ENDPOINT_URL_LAMBDA: "http://host.docker.internal:5000",
6253
DURABLE_VERBOSE_MODE: "false",
54+
DURABLE_EXAMPLES_VERBOSE: "true",
6355
});
6456
});
6557
});

0 commit comments

Comments
 (0)