Skip to content

Commit

Permalink
Add LogLevel section
Browse files Browse the repository at this point in the history
  • Loading branch information
bcgov-hl committed May 29, 2024
1 parent ec43d1a commit fdb746d
Showing 1 changed file with 47 additions and 26 deletions.
73 changes: 47 additions & 26 deletions tools/config/update-configmap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,37 +22,43 @@ echo Generating D365 Configuration

D365_LOG_LEVEL=$(cat << JSON
{
"Default": "Error",
"OFM.Portal.ProviderProfile": "Error",
"OFM.D365.Process": "Error",
"OFM.D365.Batch": "Error",
"Microsoft.AspNetCore": "Error"
"LogLevel": {
"Default": "Error",
"OFM.Portal.ProviderProfile": "Error",
"OFM.D365.Process": "Error",
"OFM.D365.Batch": "Error",
"Microsoft.AspNetCore": "Error"
},
"Console": {
"FormatterName": "simple",
"FormatterOptions": {
"SingleLine": true,
"IncludeScopes": true,
"TimestampFormat": "yyyy-MM-ddTHH:mm:ss",
"UseUtcTimestamp": false,
"JsonWriterOptions": {
"Indented": true
}
}
},
"Debug": {
"LogLevel": {
"Default": "Critical"
}
}
}
JSON
)
if [ "$ENV_VAL" = "dev" ]; then
D365_LOG_LEVEL=$(cat << JSON
{
"Default": "Warning",
"OFM.Portal.ProviderProfile": "Error",
"OFM.D365.Process": "Warning",
"OFM.D365.Batch": "Warning",
"Microsoft.AspNetCore": "Warning"
}
JSON
)
fi
readonly D365_LOG_LEVEL

D365_EMAIL_SAFE_LIST_ENABLE=true
if [ "$ENV_VAL" = "prod" ]; then
D365_EMAIL_SAFE_LIST_ENABLE=false
fi
readonly D365_EMAIL_SAFE_LIST_ENABLE

D365_CONFIGURATION=$(jq << JSON
{
"Logging": $D365_LOG_LEVEL,
"LogLevel": {
"Default": "Warning",
"OFM.Portal.ProviderProfile": "Error",
"OFM.D365.Process": "Warning",
"OFM.D365.Batch": "Warning",
"Microsoft.AspNetCore": "Warning"
},
"Console": {
"FormatterName": "simple",
"FormatterOptions": {
Expand All @@ -69,7 +75,22 @@ D365_CONFIGURATION=$(jq << JSON
"LogLevel": {
"Default": "Critical"
}
},
}
}
JSON
)
fi
readonly D365_LOG_LEVEL

D365_EMAIL_SAFE_LIST_ENABLE=true
if [ "$ENV_VAL" = "prod" ]; then
D365_EMAIL_SAFE_LIST_ENABLE=false
fi
readonly D365_EMAIL_SAFE_LIST_ENABLE

D365_CONFIGURATION=$(jq << JSON
{
"Logging": $D365_LOG_LEVEL,
"AllowedHosts": "*",
"AppSettings": {
"PageSize": 50,
Expand Down

0 comments on commit fdb746d

Please sign in to comment.