jdbruijn / LedCube

Program to control an 8x8x8 RGB LED cube.
http://vidavidorra.github.io/LedCube-Documentation
GNU General Public License v3.0
0 stars 0 forks source link

Debugging function call messages with indent #4

Open vidavidorra opened 8 years ago

vidavidorra commented 8 years ago

Intro

See #3 for motivation.

It would be nice if the function call debug messages have indent so it is easier to keep track of the function calls. So the debugging messages now look like this:

 DEBUG: LayerControl_update(806, b06, 0, 0)
 DEBUG: PanelControl_update(806, b06, 0, 6, 0)
 DEBUG: LedDriver_update(0x0000)
 DEBUG: LedDriver_update(0x0000)
 DEBUG: LedDriver_update(0x0000)
 DEBUG: PanelControl_update(806, b06, 0, 4, 0)
 DEBUG: LedDriver_update(0x0000)
 DEBUG: LedDriver_update(0x0000)
 DEBUG: LedDriver_update(0x0000)
 DEBUG: PanelControl_update(806, b06, 0, 2, 0)
 DEBUG: LedDriver_update(0x0000)
 DEBUG: LedDriver_update(0x0000)
 DEBUG: LedDriver_update(0x0000)
 DEBUG: PanelControl_update(806, b06, 0, 0, 0)
 DEBUG: LedDriver_update(0x0001)
 DEBUG: LedDriver_update(0x0000)
 DEBUG: LedDriver_update(0x0000)
 DEBUG: LedCube_setPixel(b06, 0, 0, 0, 0, 0, 2)

But it would look nicer if they looked like this:

 DEBUG: LayerControl_update(806, b06, 0, 0)
  DEBUG: PanelControl_update(806, b06, 0, 6, 0)
   DEBUG: LedDriver_update(0x0000)
   DEBUG: LedDriver_update(0x0000)
   DEBUG: LedDriver_update(0x0000)
  DEBUG: PanelControl_update(806, b06, 0, 4, 0)
   DEBUG: LedDriver_update(0x0000)
   DEBUG: LedDriver_update(0x0000)
   DEBUG: LedDriver_update(0x0000)
  DEBUG: PanelControl_update(806, b06, 0, 2, 0)
   DEBUG: LedDriver_update(0x0000)
   DEBUG: LedDriver_update(0x0000)
   DEBUG: LedDriver_update(0x0000)
  DEBUG: PanelControl_update(806, b06, 0, 0, 0)
   DEBUG: LedDriver_update(0x0001)
   DEBUG: LedDriver_update(0x0000)
   DEBUG: LedDriver_update(0x0000)
 DEBUG: LedCube_setPixel(b06, 0, 0, 0, 0, 0, 2)