Introduction
Logging helps you see what your program is doing. Creating a logger in a class lets you record messages about the program's actions or errors.
You want to track when a method starts and ends.
You need to record errors or warnings in your application.
You want to debug by printing useful information without stopping the program.
You want to keep a history of important events in your app.
You want to monitor how your app behaves in different environments.