<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: ScopeLogger</title>
	<atom:link href="http://efesx.com/2009/11/18/scopelogger/feed/" rel="self" type="application/rss+xml" />
	<link>http://efesx.com/2009/11/18/scopelogger/</link>
	<description>Technical &#38; low level</description>
	<lastBuildDate>Mon, 30 Apr 2012 17:39:06 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: rmn</title>
		<link>http://efesx.com/2009/11/18/scopelogger/#comment-134</link>
		<dc:creator>rmn</dc:creator>
		<pubDate>Sat, 13 Mar 2010 10:40:31 +0000</pubDate>
		<guid isPermaLink="false">http://cplusplus.co.il/?p=609#comment-134</guid>
		<description>Essentially, that&#039;s what it is. It would work the same when used within member functions (even through LOG_FUNC). 

We could add a sort of a LOG_MEMFUN macro, so it would print the &#039;this&#039; pointer as well, perhaps?</description>
		<content:encoded><![CDATA[<p>Essentially, that&#8217;s what it is. It would work the same when used within member functions (even through LOG_FUNC). </p>
<p>We could add a sort of a LOG_MEMFUN macro, so it would print the &#8216;this&#8217; pointer as well, perhaps?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: shebang</title>
		<link>http://efesx.com/2009/11/18/scopelogger/#comment-133</link>
		<dc:creator>shebang</dc:creator>
		<pubDate>Fri, 05 Mar 2010 23:46:44 +0000</pubDate>
		<guid isPermaLink="false">http://cplusplus.co.il/?p=609#comment-133</guid>
		<description>It could be interesting to implement the same scopelogger for tracing objects instead of functions :)</description>
		<content:encoded><![CDATA[<p>It could be interesting to implement the same scopelogger for tracing objects instead of functions <img src='http://efesx.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: lprichmond</title>
		<link>http://efesx.com/2009/11/18/scopelogger/#comment-132</link>
		<dc:creator>lprichmond</dc:creator>
		<pubDate>Fri, 08 Jan 2010 19:42:47 +0000</pubDate>
		<guid isPermaLink="false">http://cplusplus.co.il/?p=609#comment-132</guid>
		<description>Vladimir Prus has just volunteered be the review manager for the Boost.Log review. So one step closer.</description>
		<content:encoded><![CDATA[<p>Vladimir Prus has just volunteered be the review manager for the Boost.Log review. So one step closer.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: lorg</title>
		<link>http://efesx.com/2009/11/18/scopelogger/#comment-131</link>
		<dc:creator>lorg</dc:creator>
		<pubDate>Sun, 06 Dec 2009 23:32:14 +0000</pubDate>
		<guid isPermaLink="false">http://cplusplus.co.il/?p=609#comment-131</guid>
		<description>Very nice code.
I&#039;d say that the exit point is also important - you can log stuff about the return value of the function, maybe special case bools, ints and pointers.
Also interesting is the addition of MT support.

On another subject:
In Python it&#039;s a &quot;standard exercise&quot; to implement a trace function decorator. With little additional work, such a decorator can work &amp; look just like your LOG_FUNC, except maybe making it a little more Pythonic.</description>
		<content:encoded><![CDATA[<p>Very nice code.<br />
I&#8217;d say that the exit point is also important &#8211; you can log stuff about the return value of the function, maybe special case bools, ints and pointers.<br />
Also interesting is the addition of MT support.</p>
<p>On another subject:<br />
In Python it&#8217;s a &#8220;standard exercise&#8221; to implement a trace function decorator. With little additional work, such a decorator can work &amp; look just like your LOG_FUNC, except maybe making it a little more Pythonic.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rmn</title>
		<link>http://efesx.com/2009/11/18/scopelogger/#comment-130</link>
		<dc:creator>rmn</dc:creator>
		<pubDate>Wed, 02 Dec 2009 21:12:52 +0000</pubDate>
		<guid isPermaLink="false">http://cplusplus.co.il/?p=609#comment-130</guid>
		<description>Very nifty feature of VS, thanks for introducing it.
You are essentially correct with your observation that this will probably be for light debugging purposes, or maybe statistical analysis of execution (for example, we could also create a timer and print its stats on return, to have the timing of each function). 
This approach is also pretty useful since it does not have to be an entirely compile time mechanism - we can set at least some of these printouts to be run-time dependant (perhaps printing only if the function took longer than it should have, or depending on environment setup, etc).
I ofcourse agree that if hardcore debug is necessary, we&#039;ll probably have to invoke more complex and sophisticated tools (be it gdb, totalview, VS debugger, ..).</description>
		<content:encoded><![CDATA[<p>Very nifty feature of VS, thanks for introducing it.<br />
You are essentially correct with your observation that this will probably be for light debugging purposes, or maybe statistical analysis of execution (for example, we could also create a timer and print its stats on return, to have the timing of each function).<br />
This approach is also pretty useful since it does not have to be an entirely compile time mechanism &#8211; we can set at least some of these printouts to be run-time dependant (perhaps printing only if the function took longer than it should have, or depending on environment setup, etc).<br />
I ofcourse agree that if hardcore debug is necessary, we&#8217;ll probably have to invoke more complex and sophisticated tools (be it gdb, totalview, VS debugger, ..).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ofek Shilon</title>
		<link>http://efesx.com/2009/11/18/scopelogger/#comment-129</link>
		<dc:creator>Ofek Shilon</dc:creator>
		<pubDate>Wed, 25 Nov 2009 07:15:18 +0000</pubDate>
		<guid isPermaLink="false">http://cplusplus.co.il/?p=609#comment-129</guid>
		<description>If we skip the point-of-exit tracing, then VS already has something similar, via tracepoints: create a brekpoint, right click and mark &#039;when hit..&#039;, then mark &#039;print a message&#039; and specify $CALLSTACK.

Pros: (1) involves intervention only in the lowest function you wish to trace - and not its entire potential callers tree (which can be unknown), (2) doesn&#039;t require re-compilation.
Cons: (1) cannot (AFAIK) route output to a file or anywhere outside the debugger windows, (2) involves an actual breakpoint, with a significant performance penalty if the tracepoint is hit often.

Anyway, seems to me this is mainly a debugging facility: to collect trace info in the field you&#039;d probably want crash dumps and stack walkers and an entirely different mess. So for just debugging, I think trace points might be an easier solution (in particular because you can&#039;t know the full range of potential callers).</description>
		<content:encoded><![CDATA[<p>If we skip the point-of-exit tracing, then VS already has something similar, via tracepoints: create a brekpoint, right click and mark &#8216;when hit..&#8217;, then mark &#8216;print a message&#8217; and specify $CALLSTACK.</p>
<p>Pros: (1) involves intervention only in the lowest function you wish to trace &#8211; and not its entire potential callers tree (which can be unknown), (2) doesn&#8217;t require re-compilation.<br />
Cons: (1) cannot (AFAIK) route output to a file or anywhere outside the debugger windows, (2) involves an actual breakpoint, with a significant performance penalty if the tracepoint is hit often.</p>
<p>Anyway, seems to me this is mainly a debugging facility: to collect trace info in the field you&#8217;d probably want crash dumps and stack walkers and an entirely different mess. So for just debugging, I think trace points might be an easier solution (in particular because you can&#8217;t know the full range of potential callers).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rmn</title>
		<link>http://efesx.com/2009/11/18/scopelogger/#comment-128</link>
		<dc:creator>rmn</dc:creator>
		<pubDate>Tue, 24 Nov 2009 21:32:05 +0000</pubDate>
		<guid isPermaLink="false">http://cplusplus.co.il/?p=609#comment-128</guid>
		<description>Well, apart from maintaining the correct indentation (decreasing the indent_ member), the destructor doesn&#039;t do much. 
In my opinion it just makes it easier to identify call trees if we print where the function actually makes its exit, but we couldv&#039;e spared it just as easily.

Another thing we could use the destructor for is timing the execution time of every function, so we could print the time each function took in the destructor of this ScopeGuard (using something very similar to &lt;a href=&quot;http://cplusplus.co.il/2009/08/19/portable-measurement-of-execution-time/&quot; rel=&quot;nofollow&quot;&gt;this&lt;/a&gt;).</description>
		<content:encoded><![CDATA[<p>Well, apart from maintaining the correct indentation (decreasing the indent_ member), the destructor doesn&#8217;t do much.<br />
In my opinion it just makes it easier to identify call trees if we print where the function actually makes its exit, but we couldv&#8217;e spared it just as easily.</p>
<p>Another thing we could use the destructor for is timing the execution time of every function, so we could print the time each function took in the destructor of this ScopeGuard (using something very similar to <a href="http://cplusplus.co.il/2009/08/19/portable-measurement-of-execution-time/" rel="nofollow">this</a>).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: alpmestan</title>
		<link>http://efesx.com/2009/11/18/scopelogger/#comment-127</link>
		<dc:creator>alpmestan</dc:creator>
		<pubDate>Mon, 23 Nov 2009 07:43:36 +0000</pubDate>
		<guid isPermaLink="false">http://cplusplus.co.il/?p=609#comment-127</guid>
		<description>Indeed, but it&#039;s been in the &quot;proposed&quot; state for a long time. I don&#039;t know when it&#039;ll be reviewed and possibly accepted, and even if it&#039;ll be.</description>
		<content:encoded><![CDATA[<p>Indeed, but it&#8217;s been in the &#8220;proposed&#8221; state for a long time. I don&#8217;t know when it&#8217;ll be reviewed and possibly accepted, and even if it&#8217;ll be.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ofek</title>
		<link>http://efesx.com/2009/11/18/scopelogger/#comment-126</link>
		<dc:creator>ofek</dc:creator>
		<pubDate>Sun, 22 Nov 2009 19:41:44 +0000</pubDate>
		<guid isPermaLink="false">http://cplusplus.co.il/?p=609#comment-126</guid>
		<description>Roman - do you have an actual scenario where the point of leaving a function adds value? (I mean - why should the destructor be instrumented?)</description>
		<content:encoded><![CDATA[<p>Roman &#8211; do you have an actual scenario where the point of leaving a function adds value? (I mean &#8211; why should the destructor be instrumented?)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ofek</title>
		<link>http://efesx.com/2009/11/18/scopelogger/#comment-125</link>
		<dc:creator>ofek</dc:creator>
		<pubDate>Sun, 22 Nov 2009 08:50:08 +0000</pubDate>
		<guid isPermaLink="false">http://cplusplus.co.il/?p=609#comment-125</guid>
		<description>Nice! As another quibble, I&#039;d suggest branching the LOG_FUNC definition to be null if _DEBUG is not defined. Naturally the overhead of stream outputs can be prohibitively expensive in production builds.</description>
		<content:encoded><![CDATA[<p>Nice! As another quibble, I&#8217;d suggest branching the LOG_FUNC definition to be null if _DEBUG is not defined. Naturally the overhead of stream outputs can be prohibitively expensive in production builds.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

