<?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: Dropping NSLog in release builds</title>
	<atom:link href="http://www.cimgf.com/2009/01/24/dropping-nslog-in-release-builds/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.cimgf.com/2009/01/24/dropping-nslog-in-release-builds/</link>
	<description>Taglines are for Windows programmers</description>
	<lastBuildDate>Tue, 09 Mar 2010 15:03:03 -0500</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Joel</title>
		<link>http://www.cimgf.com/2009/01/24/dropping-nslog-in-release-builds/comment-page-1/#comment-1167</link>
		<dc:creator>Joel</dc:creator>
		<pubDate>Tue, 03 Mar 2009 20:39:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.cimgf.com/?p=411#comment-1167</guid>
		<description>&lt;p&gt;CIMGF helped me out once again!  I&#039;d put off handling my NSLog problem way too long.  Your approach is clear and effective.  Thank you!&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>CIMGF helped me out once again!  I&#8217;d put off handling my NSLog problem way too long.  Your approach is clear and effective.  Thank you!</p>]]></content:encoded>
	</item>
	<item>
		<title>By: yile</title>
		<link>http://www.cimgf.com/2009/01/24/dropping-nslog-in-release-builds/comment-page-1/#comment-1162</link>
		<dc:creator>yile</dc:creator>
		<pubDate>Sat, 28 Feb 2009 07:20:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.cimgf.com/?p=411#comment-1162</guid>
		<description>&lt;p&gt;I am from cocoaChina forum, just a developer on iPhone.
Thank you, man!&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I am from cocoaChina forum, just a developer on iPhone.
Thank you, man!</p>]]></content:encoded>
	</item>
	<item>
		<title>By: rgm</title>
		<link>http://www.cimgf.com/2009/01/24/dropping-nslog-in-release-builds/comment-page-1/#comment-1151</link>
		<dc:creator>rgm</dc:creator>
		<pubDate>Thu, 05 Feb 2009 20:37:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.cimgf.com/?p=411#comment-1151</guid>
		<description>&lt;p&gt;@garretmurray.net I scratched my head on this one for a while.&lt;/p&gt;

&lt;p&gt;It turns out that if you have your build set to &quot;Simulator &#124; Debug&quot; then the &#039;Other C Flags&#039; setting will not show up. Set your project to &quot;Device &#124; Debug&quot; and the flags setting will suddenly show up in the Build Settings.&lt;/p&gt;

&lt;p&gt;Set it, then you can go back to &quot;Simulator &#124; Debug&quot; and it appears to hold. I tested this on the 2.2.1 SDK.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>@garretmurray.net I scratched my head on this one for a while.</p>

<p>It turns out that if you have your build set to &#8220;Simulator | Debug&#8221; then the &#8216;Other C Flags&#8217; setting will not show up. Set your project to &#8220;Device | Debug&#8221; and the flags setting will suddenly show up in the Build Settings.</p>

<p>Set it, then you can go back to &#8220;Simulator | Debug&#8221; and it appears to hold. I tested this on the 2.2.1 SDK.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: id.garrettmurray.net/</title>
		<link>http://www.cimgf.com/2009/01/24/dropping-nslog-in-release-builds/comment-page-1/#comment-1150</link>
		<dc:creator>id.garrettmurray.net/</dc:creator>
		<pubDate>Tue, 03 Feb 2009 22:01:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.cimgf.com/?p=411#comment-1150</guid>
		<description>&lt;p&gt;Is there a good way to do this for iPhone development? There&#039;s no way to pass an Other C flag that I can tell in an iPhone app target...&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Is there a good way to do this for iPhone development? There&#8217;s no way to pass an Other C flag that I can tell in an iPhone app target&#8230;</p>]]></content:encoded>
	</item>
	<item>
		<title>By: wevah.vox.com/</title>
		<link>http://www.cimgf.com/2009/01/24/dropping-nslog-in-release-builds/comment-page-1/#comment-1138</link>
		<dc:creator>wevah.vox.com/</dc:creator>
		<pubDate>Tue, 27 Jan 2009 20:38:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.cimgf.com/?p=411#comment-1138</guid>
		<description>&lt;p&gt;I&#039;ve been doing something pretty similar, though my DLog (inside the #ifdef DEBUG) looks like:&lt;/p&gt;

&lt;h1&gt;define DebugLog(s, ...) NSLog((@&quot;%s %s:%d &quot; s), &lt;strong&gt;func&lt;/strong&gt;, basename(&lt;strong&gt;FILE&lt;/strong&gt;), &lt;strong&gt;LINE&lt;/strong&gt;, ## &lt;strong&gt;VA_ARGS&lt;/strong&gt;);&lt;/h1&gt;

&lt;p&gt;Just some extra contextual information before the actual log statement. (This does, of course, lead to extra noise, which might end up causing more confusion in simple projects.)&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I&#8217;ve been doing something pretty similar, though my DLog (inside the #ifdef DEBUG) looks like:</p>

<h1>define DebugLog(s, &#8230;) NSLog((@&#8221;%s %s:%d &#8221; s), <strong>func</strong>, basename(<strong>FILE</strong>), <strong>LINE</strong>, ## <strong>VA_ARGS</strong>);</h1>

<p>Just some extra contextual information before the actual log statement. (This does, of course, lead to extra noise, which might end up causing more confusion in simple projects.)</p>]]></content:encoded>
	</item>
	<item>
		<title>By: jollyjinx</title>
		<link>http://www.cimgf.com/2009/01/24/dropping-nslog-in-release-builds/comment-page-1/#comment-1137</link>
		<dc:creator>jollyjinx</dc:creator>
		<pubDate>Tue, 27 Jan 2009 14:12:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.cimgf.com/?p=411#comment-1137</guid>
		<description>&lt;p&gt;I&#039;m using something similar, but more verbose for us developers. It&#039;s also logging the instance and line numbers , class and method name. As described here:&lt;/p&gt;

&lt;p&gt;http://www.jinx.de/teclog/2008.11.13.my-own-version-nslog-jlog.html&lt;/p&gt;

&lt;p&gt;Jolly aka Patrick&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;author of: ScreenRecycler, JollysFastVNC, SmartSleep, SmartSokoban and more.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I&#8217;m using something similar, but more verbose for us developers. It&#8217;s also logging the instance and line numbers , class and method name. As described here:</p>

<p><a href="http://www.jinx.de/teclog/2008.11.13.my-own-version-nslog-jlog.html" rel="nofollow">http://www.jinx.de/teclog/2008.11.13.my-own-version-nslog-jlog.html</a></p>

<p>Jolly aka Patrick</p>

<hr />

<p>author of: ScreenRecycler, JollysFastVNC, SmartSleep, SmartSokoban and more.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: stompy</title>
		<link>http://www.cimgf.com/2009/01/24/dropping-nslog-in-release-builds/comment-page-1/#comment-1136</link>
		<dc:creator>stompy</dc:creator>
		<pubDate>Tue, 27 Jan 2009 11:48:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.cimgf.com/?p=411#comment-1136</guid>
		<description>&lt;p&gt;@Berhnard;&lt;/p&gt;

&lt;p&gt;have a look here&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>@Berhnard;</p>

<p>have a look here</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel Jalkut</title>
		<link>http://www.cimgf.com/2009/01/24/dropping-nslog-in-release-builds/comment-page-1/#comment-1135</link>
		<dc:creator>Daniel Jalkut</dc:creator>
		<pubDate>Tue, 27 Jan 2009 00:25:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.cimgf.com/?p=411#comment-1135</guid>
		<description>&lt;p&gt;Apple ships a tool which should be installed on most, if not all developers&#039; systems, called &quot;tops.&quot; It&#039;s really just a slightly glorified sed-type tool, but it behaves in some sensible ways that would be harder to program in with sed. For example, it won&#039;t replaces occurences of the symbol name in comments, etc.&lt;/p&gt;

&lt;p&gt;Run something like this on your sources to see what it would do:&lt;/p&gt;

&lt;p&gt;tops -dont replace &quot;NSLog&quot; with &quot;DLog&quot; *.m&lt;/p&gt;

&lt;p&gt;Then take out the -dont if you&#039;re happy with what you see ;)&lt;/p&gt;

&lt;p&gt;Daniel&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Apple ships a tool which should be installed on most, if not all developers&#8217; systems, called &#8220;tops.&#8221; It&#8217;s really just a slightly glorified sed-type tool, but it behaves in some sensible ways that would be harder to program in with sed. For example, it won&#8217;t replaces occurences of the symbol name in comments, etc.</p>

<p>Run something like this on your sources to see what it would do:</p>

<p>tops -dont replace &#8220;NSLog&#8221; with &#8220;DLog&#8221; *.m</p>

<p>Then take out the -dont if you&#8217;re happy with what you see ;)</p>

<p>Daniel</p>]]></content:encoded>
	</item>
	<item>
		<title>By: me.yahoo.com/a/D2iXY8odr</title>
		<link>http://www.cimgf.com/2009/01/24/dropping-nslog-in-release-builds/comment-page-1/#comment-1134</link>
		<dc:creator>me.yahoo.com/a/D2iXY8odr</dc:creator>
		<pubDate>Mon, 26 Jan 2009 21:27:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.cimgf.com/?p=411#comment-1134</guid>
		<description>&lt;p&gt;Excellent trick! But I don&#039;t seems to have the &quot;Other C Flags&quot; section... I am in the Build tab of Debug-Config... Obviously I missed a tiny details, but which one?&lt;/p&gt;

&lt;p&gt;Thx&lt;/p&gt;

&lt;p&gt;Bernhard&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Excellent trick! But I don&#8217;t seems to have the &#8220;Other C Flags&#8221; section&#8230; I am in the Build tab of Debug-Config&#8230; Obviously I missed a tiny details, but which one?</p>

<p>Thx</p>

<p>Bernhard</p>]]></content:encoded>
	</item>
	<item>
		<title>By: ergosys.myopenid.com/</title>
		<link>http://www.cimgf.com/2009/01/24/dropping-nslog-in-release-builds/comment-page-1/#comment-1133</link>
		<dc:creator>ergosys.myopenid.com/</dc:creator>
		<pubDate>Mon, 26 Jan 2009 21:06:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.cimgf.com/?p=411#comment-1133</guid>
		<description>&lt;p&gt;That can cause mysterious bugs or if you are lucky, a  compile error when DEBUG is off because /* &lt;em&gt;/ is not a statement. E.g. if (x) DLog(...).   Instead, use do {} while (0) in place of the /&lt;/em&gt; */&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>That can cause mysterious bugs or if you are lucky, a  compile error when DEBUG is off because /* <em>/ is not a statement. E.g. if (x) DLog(&#8230;).   Instead, use do {} while (0) in place of the /</em> */</p>]]></content:encoded>
	</item>
</channel>
</rss>
