aws / aws/aws-logging-dotnet

"Library Log File" Grows With No Limit (2.0)

Open
#171 8 comments 0 reactions 0 assignees View on GitHub
feature-request module/logging p2 queued
Dominant language
C#
Stars
307
Forks
135
Avg merge
1d 10h
Merged PRs (30d)
4

Description

[As requested](https://github.com/aws/aws-logging-dotnet/issues/80#issuecomment-900447499), opening this ticket that was previously closed prematurely to re-report this issue.

The issue: if there is a problem preventing the logs from being able to be sent to CloudWatch, the `aws-logger-errors.txt` file will be filled and grow with no bounds, eventually filling the disk.

As `sattpat` replied back in 2019:

>We certainly dont want to be logging every single issue. We would instead like to capture exceptions that are unique. Meaning that if you get exceptions as a result of network connection, we only log that once and we skip the repeats.

This seems like a very good solution. Perhaps whatever is logging to `aws-logger-errors.txt` could keep track of recently written errors, and if it's logging the same error several times in a row, it logs an additional "This issue won't be logged again until the process is restarted", and then stops logging that same error again.

Contributor guide

Open the contributing guide

Research direction

Use the aws-logger-errors.txt writer and the CloudWatch delivery failure path as entry points. Determine how repeated exceptions are currently recorded and define the duplicate-suppression behavior described in the issue. Done means repeated identical failures no longer grow the file without bounds, while unique errors remain available for diagnosis.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, csharp
Domain
cloud, observability
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.