-
Notifications
You must be signed in to change notification settings - Fork 133
Description
Describe the bug
When using NLog.AWS.Logger in an AWS Lambda environment, any errors encountered during logging are not reported effectively. The library attempts to write errors to a file, but since the file system in Lambda is read-only, this results in a failure to log the error details.
Regression Issue
- Select this option if this issue appears to be a regression.
Expected Behavior
Errors should be logged or reported in a way that is accessible, even in a read-only environment.
Current Behavior
The only workaround is to set the property LibraryLogErrors="false"
, which prevents any logging of errors, making it impossible to diagnose issues.
Reproduction Steps
- Set up an AWS Lambda function using NLog.AWS.Logger.
- Introduce an error in the logging process.
- Observe that the error is not logged due to the attempt to write to a read-only file system.
Possible Solution
Consider implementing an alternative logging mechanism that captures errors in AWS Lambda without relying on file system access, or provide a way to output errors to the console or another logging service.
Additional Information/Context
No response
AWS .NET SDK and/or Package version used
AWSSDK.Core 4.0.0
Targeted .NET Platform
.NET 6
Operating System and version
AWS Lambda