Skip to content

Commit 4868b28

Browse files
author
Alex Wang
committed
feature: Support loggingConfig for examples
- Add loggingConfig in cli module - Update logging example
1 parent 7f95a5c commit 4868b28

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

examples/cli.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,7 @@ def deploy_function(example_name: str, function_name: str | None = None):
330330
"Variables": {"AWS_ENDPOINT_URL_LAMBDA": config["lambda_endpoint"]}
331331
},
332332
"DurableConfig": example_config["durableConfig"],
333+
"LoggingConfig": example_config.get("loggingConfig", {})
333334
}
334335

335336
if config["kms_key_arn"]:

examples/examples-catalog.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,10 @@
153153
"RetentionPeriodInDays": 7,
154154
"ExecutionTimeout": 300
155155
},
156+
"loggingConfig": {
157+
"ApplicationLogLevel": "INFO",
158+
"LogFormat": "JSON"
159+
},
156160
"path": "./src/logger_example/logger_example.py"
157161
},
158162
{

examples/src/logger_example/logger_example.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,6 @@
1010
)
1111
from aws_durable_execution_sdk_python.execution import durable_execution
1212

13-
import logging
14-
15-
logging.getLogger().setLevel(logging.INFO)
16-
17-
1813
@durable_with_child_context
1914
def child_workflow(ctx: DurableContext) -> str:
2015
"""Child workflow with its own logging context."""

0 commit comments

Comments
 (0)