I've been using something similar lately for my "quick and dirty print debugging" needs [1]. It's much nicer and requires less effort than just using printf/cout. I feel like many of the critical comments here are missing that that's probably the intended use-case of this.