I would like to know if you guys have any suggestions about debug levels when writing an application.
I thought about 4 levels:
0 : No Debug
1 : All inpu
This is my list:
Application emits nothing debug-related. Under no circumstances the application will emit anything to the UART or debug-console.
Hard and un-recoverable errors are logged to the console.
Enables extra debug-information intended to help other programmers.
This mode is not intended to catch bugs but to provide information to other programmers who use my applications/library. In warning mode I mostly check the input parameters and try to detect if someone tries to do something stupid. Like brute-force a solution or passing just the data-type that's slowest around.
In Debug mode I start to log everything, sorted by frequency of occurance. Level one is not very verbose. Major things that my program/application has done gets logged. Not much more. This mode is intended to be used to get a rough idea of what a client is doing.
The higher the debug-mode, the more information gets logged.
My highest level of debug is reserved for all interprocess and interthread communication. All accesses to semaphores, mutexes ect will be logged with as much detail as possible.