mapnik/mapnik — Issue #937: Make better debug print system
Author: kunitoki
Created: 2011-10-31 08:45:32+00:00
State: open

When developing and debugging (especially on plugins), it should be straight forward to enable / disable debugging printf's per-module: this way i would enable debugging only for the plugin or module under testing, and turn it off for the others.

We should have this kind of priority, something like :

1- Ability to enable or disable GLOBAL debugging print statements in all part of mapnik (everything)
2- Ability to enable or disable PER-GLOBAL-MODULE debugging print statements (core, plugins)
3- Ability to enable or disable PER-MODULE debugging print statements (single _logical_ module)

A higher level control lower levels (if we have a 3rd level enabled but i disable level 2 for the same logical scope, then no debug output)...

MAPNIK_DEBUG
|
--------- MAPNIK_DEBUG_CORE
| |
| ---------- MAPNIK_DEBUG_CORE_RENDERER
| |
| ---------- MAPNIK_DEBUG_CORE_METAWRITER
|
--------- MAPNIK_DEBUG_PLUGINS
| |
| ---------- MAPNIK_DEBUG_PLUGIN_SHAPE
| |
| ---------- MAPNIK_DEBUG_PLUGIN_OGR
...

Also, to ease runtime control, let decide at runtime if we want to see the debugging or not (via map or session property) ?