NetCordDev / NetCordDev/NetCord
Grouped Logging needs refactoring
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 454
- Forks
- 42
- Avg merge
- 22h 41m
- Merged PRs (30d)
- 14
Description
Description
There are numerous traces of:
$"...{Environment.NewLine}{e}"
When calling log and setting the message for errors (exceptions).
This pattern isn't deployable; let's have the logger handle exception formatting instead.
Especially if some exceptions should be treated as WARN instead of ERR.
Also, another thing is reducing redundant logger because of log tagging.
Log tagging was done by separating logger interfaces, but they ended up redundant, with the same structure.
(e.g., IVoiceLogger, IRestLogger, IGatewayLogger)
The only difference is actually in the default logger implementation.
(e.g., ShardedTextWriterLogger, TextWriterLogger)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the interpolated exception messages using Environment.NewLine and the logger interfaces named in the issue, including IVoiceLogger, IRestLogger, IGatewayLogger, ShardedTextWriterLogger, and TextWriterLogger. The refactor is done when exception formatting is handled by the logger, WARN versus ERR treatment remains possible, and redundant logger interfaces are removed without losing tagging behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- observability
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100