Use debug areas instead of debug levels
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Freeode |
Fix Released
|
Wishlist
|
Eike |
Bug Description
The debug_print function uses a global variable DEBUG_LEVEL, to decide if a certain debug message should be printed.
This leads to an overwhelming amount of debug messages a high (verbose) debug level.
Instead use a set of strings (named DEBUG_AREAS) to decide if a debug message should be printed. The debug function has corresponding argument 'area' which must be in the set for the message to be printed.
A default debug area "general" or "0" is put into the set (DEBUG_AREAS) when the module is imported. This default area is also the default value of debug_print's area argument. A test function can put arbitrary additional strings into the set to enable specific debug messages to be printed.
The compiler's main function empties the set, so that normally no debug messages are printed. Additionally there should be the command line option --enable-
Changed in freeode: | |
importance: | Undecided → Medium |
importance: | Medium → Wishlist |
Changed in freeode: | |
status: | New → Fix Committed |
assignee: | nobody → Eike (eike-welk) |
milestone: | none → 0.4.0 |
Changed in freeode: | |
status: | Fix Committed → Fix Released |