research if we should be using loggers in our backend. #856
Labels
No labels
_CRITICAL_
API
app
backEnd
Blocked, waiting for further changes
bug
cleanup
close
design
duplicate
enhancement
feature request
frontEnd
help wanted
invalid
low priority
needs input
needs review
project documentation
question
research
reviewed
script
security
SQL
style
testing
topLevel
wontfix
No milestone
No project
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Andras/BoundlessFlowCampus2K#856
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
At the moment our logging is just random Console.WriteLines. It gets the job done but it is far from optimal. After some basic searching i found something called Logging .
What should be done
Should we use this in our application?
In my opinion, yes:
ILogger is a high-performance, structured logging API to help monitor application behavior and diagnose issues. Its basic logging providers are already built-in to ASP.NET Core
ILogger is better for debugging since it adds structure and control to logging
Advantages over Console.WriteLine. ILogger can:
Pros:
(Recommended)
Another alternative is Serilog
It is modern. Net logging library designed for structured logging and built with powerful structured event data.
Pros:
Cons:
Recommendation
For this current application, the best choice is to replace the Console.Writeline with ILogger system.
Using this logging framework will provide more structured and easier to read logs. It will make filtering and debugging easier.
It can separate into different levels (Information, Warning, and Error), which makes it much easier to find important issues.
It also allows us to identify which class generated a log message.
There is a better alternative, such as Serilog. However, in my personal opinion, Serilog is unnecessary and too advanced for this project. It can still be integrated later on.
Review
What did i review?
Issue focus
The issue is focused on this being exclusively a research issue, and should probably spawn sub issues for implementation
The issue seems reasonable and good for future debugging
Issue resolving
NOTE
We have been notified earlier that all decision making introducing dependencies to the project should be documented precisely to help subsequent developers understand why they exist. I will note the leader regarding this issue to see if any further work needs to be done in regards to this aspect.
ILogger is a high-performance, structured logging API to help monitor application behavior and diagnose issues. Its basic logging providers are already built-in to ASP.NET Core
Barbecue of this ILogger is going to be used