Logging is the way to keep records for the event. It can be any vital information related to that application.
Errors logs:- Helps to debug the application.
Time for the execution of the event:- to compare the performance of the application.
What are the log levels?
Log level or log severity is the categorization of the logs.
Log Levels are in order of severity:
Let's understand them in details.
Trace
Logging all the step of the event.
Debug
These logs help to debug the application. It's for the developer, admins etc.
Info
It contains general information you want to capture, like the timestamp of the event.
Warn
Unexpected behaviour happened in the application, but it can continue with its work.
Key business features are operating as expected.
Example:
Loss of network connectivity, the application will resume the task once it gets network.
Error
One or more functionalities are not working, preventing some functionalities from working correctly.
Fatal
One or more key business functionalities are not working, and the whole system doesn't fulfil the business functionalities.
Further Reading Material