-
Notifications
You must be signed in to change notification settings - Fork 479
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LAMBDA_NET_SERIALIZER_DEBUG not working JSON log format #1809
Comments
From my testing I see the debug log messages showing up in the log message with JSON as the log format with and without AOT. The messages come out as info log messages, what is the log level set for the functions.
|
Hmm. I'll have another look today, but didn't seem to be getting anything until I switched back to Text. I tried turning things up as far as Trace too. |
Yeah, sorry, this was down to me forgetting I'd reworked my Lambda deployment setup. It used to be that I didn't set the environment variables on deployment. I changed this at some point in the last year (I think it was for the It's also possible I missed it amongst the platform-level events (the ones that have |
Comments on closed issues are hard for our team to see. |
Describe the bug
I've been trying to diagnose an issue I'm getting with trying to use JSON polymorphism with .NET 9 and AoT in a Lambda function, and in the process it seems that
LAMBDA_NET_SERIALIZER_DEBUG
doesn't work when a Lambda function is configured to log as JSON instead of text.My guess would be that CloudWatch is expecting the
Console.WriteLine()
calls to be in a certain format, and then when they aren't silently drops them.Regression Issue
Expected Behavior
Output when
LAMBDA_NET_SERIALIZER_DEBUG=true
appears in CloudWatch logs.Current Behavior
Output is missing from CloudWatch logs.
Reproduction Steps
Set
LAMBDA_NET_SERIALIZER_DEBUG=true
for a C# Lambda function that is configured to use JSON logs.Possible Solution
Detect that JSON logging is configured and output to the console in a manner that does not got broken by the JSON content of the payloads being logged.
Additional Information/Context
No response
AWS .NET SDK and/or Package version used
Amazon.Lambda.RuntimeSupport 1.11.0
Targeted .NET Platform
.NET 9
Operating System and version
Amazon Linux 2023
The text was updated successfully, but these errors were encountered: