aws-lambda-dotnet
aws-lambda-dotnet copied to clipboard
Lambda PowerShell Functions Do Not Log Debug Messages to CloudWatch Messages
Describe the bug
We already have internal case and ticket V1078993289 for this, but creating this so others can track a fix publicly.
Expected Behavior
"Write-Debug" should print to CloudWatch messages when adding -Debug parameter or using $DebugPreference to get the message displayed on console.
Current Behavior
Messages aren't logged.
Possible Solution
This probably is happening because "Write-Debug" isn't included in these events https://github.com/aws/aws-lambda-dotnet/blob/master/Libraries/src/Amazon.Lambda.PowerShellHost/PowerShellFunctionHost.cs#L294