Use debug areas instead of debug levels

Bug #599737 reported by Eike
6
This bug affects 1 person
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-msg=area1,area2, ... so that debug messages can be printed when the compiler is run from the command line.

Eike (eike-welk)
Changed in freeode:
importance: Undecided → Medium
importance: Medium → Wishlist
Eike (eike-welk)
Changed in freeode:
status: New → Fix Committed
assignee: nobody → Eike (eike-welk)
milestone: none → 0.4.0
Eike (eike-welk)
Changed in freeode:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.