This is due to the ability to filter certain information.
The difference is that you can configure your system to record informational messages only and ignore debug messages, or you can configure both to register, and most importantly, you can do this without recompiling / modifying your program.
Even if all messages are recorded, if you use the viewer, you can set the viewer to debug messages and display only higher levels (and therefore more important messages).
(Note: There are actually more levels of logging, such as Warn, Error, and Fatal)
I would like to use the information for the message, which should give me an idea of ββwhat the program is doing (and confirm that it works fine) and debug the information that I may need to try to track why it is not working
For example, I have a service that runs on a server that periodically downloads a text file from an external server and then processes the information. I have a program configured only to log informational messages, and I use log.info to record when services start and stop, as well as several other important messages. This makes the log file small, but allows me to see the information I want to use every day.
However, if something goes wrong with the processing, I may need to find out more (I dare say debugging) information about the contents of the file being processed and other information to indicate what it does with the file.
I donβt need and do not want to write this information all the time, therefore, using log.debug, I can ignore it until the time comes when I need it. (The reason I don't want to record it is because the output is very large and therefore slows down the process).