Logger

Java provides the ability to capture the log files.

The need for Log capture There are multiple reasons why we may need to capture the application activity.

Recording unusual circumstances or errors that may be happening in the program Getting the info about what's going in the application The details which can be obtained from the logs can vary. Sometimes, we may want a lot of details regarding the issue, or sometimes some light information only. Like when the application is under development and is undergoing the testing phase, we may need to capture a lot of details.

4 log levels: 1. INFO- Entrance to function 2. INFO- Exit from function 3. DEBUG- Change of attributes 4. ERROR- Exception

Last updated

Was this helpful?