Skip to content

Commit 765053f

Browse files
authored
Override DD_LOG_LEVEL env var to WARN in the forwarder template (#867)
1 parent e749356 commit 765053f

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

aws/logs_monitoring/template.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,16 @@ Parameters:
249249
Type: String
250250
Default: ""
251251
Description: The name of an existing s3 bucket to use. If not provided, a new bucket will be created.
252+
DdLogLevel:
253+
Type: String
254+
Default: "WARN"
255+
Description: Set the log level for the forwarder. Valid values are DEBUG, INFO, WARN, ERROR, CRITICAL. If not set, default is WARN.
256+
AllowedValues:
257+
- DEBUG
258+
- INFO
259+
- WARN
260+
- ERROR
261+
- CRITICAL
252262
Conditions:
253263
IsAWSChina: !Equals [!Ref 'AWS::Partition', aws-cn]
254264
IsGovCloud: !Equals [!Ref 'AWS::Partition', aws-us-gov]
@@ -336,6 +346,8 @@ Conditions:
336346
- !Equals [!Join ["", !Ref VPCSecurityGroupIds], ""]
337347
SetVpcSubnetIds: !Not
338348
- !Equals [!Join ["", !Ref VPCSubnetIds], ""]
349+
SetDdLogLevel: !Not
350+
- !Equals [!Ref DdLogLevel, ""]
339351
Rules:
340352
MustSetDdApiKey:
341353
Assertions:
@@ -524,6 +536,10 @@ Resources:
524536
- SetDdTraceIntakeUrl
525537
- !Ref DdTraceIntakeUrl
526538
- !Ref AWS::NoValue
539+
DD_LOG_LEVEL: !If
540+
- SetDdLogLevel
541+
- !Ref DdLogLevel
542+
- !Ref AWS::NoValue
527543
ReservedConcurrentExecutions: !If
528544
- SetReservedConcurrentExecutions
529545
- !Ref ReservedConcurrency
@@ -988,6 +1004,7 @@ Metadata:
9881004
- DdForwarderExistingBucketName
9891005
- DdForwarderBucketName
9901006
- DdStoreFailedEvents
1007+
- DdLogLevel
9911008
ParameterLabels:
9921009
DdApiKey:
9931010
default: "DdApiKey *"

0 commit comments

Comments
 (0)