Great video! I'm new to this and a bit confused about logging in .NET. I understand it's a good idea to use logs to track all activities in the application. But is it advisable to use logging in every method? Or just in complex methods? For instance, when adding an entity to the database, it typically goes through the controller, service, and repository layers. Should I implement logging throughout this traffic? Also, a suggestion for a video would be demonstrating logs to be sent via email.
There is Level feature of logging so any logging could have a category. It could be trace(almost everything), debug, information, warning, error or critical. So the information that you wanna log should have the corresponding level. You want to log the info only make sense and also you want to categorise them.