Skip to content

Commit c07077c

Browse files
Alex Wangwangyb-A
authored andcommitted
feature: Support loggingConfig for examples
- Add loggingConfig in cli module - Update logging example
1 parent 6585ea4 commit c07077c

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
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
@@ -164,6 +164,10 @@
164164
"RetentionPeriodInDays": 7,
165165
"ExecutionTimeout": 300
166166
},
167+
"loggingConfig": {
168+
"ApplicationLogLevel": "INFO",
169+
"LogFormat": "JSON"
170+
},
167171
"path": "./src/logger_example/logger_example.py"
168172
},
169173
{

examples/src/logger_example/logger_example.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +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-
1713

1814
@durable_with_child_context
1915
def child_workflow(ctx: DurableContext) -> str:

0 commit comments

Comments
 (0)