From: <log...@li...> - 2015-03-16 23:35:31
|
On 3/16/15, 11:33 PM, "log...@li..." <log...@li...> wrote: > >I'm doing some further research into this, NDC sounds closer to what I'm >after, however one things that concerns me is that it appears I need to >manually push my context onto it each time I enter a context rather than >just writing to an object that does this for me. Yes, but you can wrap all that into your classes via c'tors and d'tors so that it's automatic if you design things right. >Basically what I'm after, is an object that I can hold either by >reference or pointer, that when I write to it, it applies the necessary >tagging to identify that line in the log and know where it came from. You could also wrap the Category interface so that when you call methods on it, it pushes/pops the NDC for you before calling the category methods. -- Scott |