Skip to content

Commit 8440c9a

Browse files
committed
Add default suppression of log events
1 parent 171ba41 commit 8440c9a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lambda/main.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111

1212

1313
def lambda_handler(event, context):
14-
logger.debug("Input event: {}".format(json.dumps(event)))
14+
if event.get('log_event', False):
15+
logger.debug("Input event: {}".format(json.dumps(event)))
1516

1617
cmd = event['interpreter']
1718
if event['command'] is not None:
@@ -23,7 +24,8 @@ def lambda_handler(event, context):
2324
cmd.append(scriptpath)
2425

2526
# Run the command as a subprocess
26-
logger.info("Running command: {}".format(cmd))
27+
if event.get('log_event', False):
28+
logger.info("Running command: {}".format(cmd))
2729

2830
# For the subprocess environment, use all of the existing env vars, plus
2931
# any new ones. New ones with the same name will overwrite.

0 commit comments

Comments
 (0)