I'm currently writing a program that has debug output strewn throughout it. This is all well and good, but I'd like to be able to advance the tab position for things in different scopes, for instance, this is what I have right now:
#ifndef NDEBUG
printf("Updating player\n");
#endif
player.Update();
#ifndef NDEBUG
printf("Done updating player\n");
#endif
I'd like to have so that all the output called between these two blocks is advanced by one tab position; however, simply adding tabs to the beginning of Player::Update() output is incredibly clunky AND difficult to maintain.
Anybody got any help? (Note: I have no problem with using cout instead; I was just recently lectured about the overhead and insecurity with cout)