This question is language-agnostic. What is the difference between the enumerated levels. In applications I've seen many INFO messages that seemed DEBUG info to me and vice-versa.
views:
46answers:
4Well, there are a number of different interpretations for this. My personal opinion is:
- INFO - information relating to the status or progress of the application. This is where information that would be useful to determine the current state of the application should be written.
- DEBUG - information related to internal processes or failures in the application. This is where failures and diagnostic information should be written.
None of the above is standardized, but represents my opinion and observations.
i'd say, the conceptual difference is the target audience. "info" is for users working with an application, "debug" is for developers working on the application itself.
My rule of thumb is that if you turn debug logging on for some component, the log should go so fast that it's exciting to watch, whereas if you turn info logging on, the log should go so slowly that it's calming to watch.
You can then regulate the log level according to your mood: if you're doing some hacking, you need stimulation, so you turn on debug logging and get into the flow of what's happening; if you're monitoring a build or a test run, you turn on info logging, and observe that everything is ticking over nicely.
This Article on ddj.com covers this topic besides others. Although it says "BAsic" instead of "Info", which is probably more correct:
* Logging Class 0: Basic
o Data sources/documents/connections opened and closed
o Size or number of items in opened documents
o Commands executed
o User or requester information
o All messages shown to users
o All answers/choices users have made
* Logging Class 1: Extended
o Information from certain important functions called, such as executed or passed program paths.
o Information about received and processed events/requests
o All status information shown to users
* Logging Class 2: Debug
o Information from within loops for all iterations
o Extensive data dumps
o Additional debug information