<?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/"
	xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
xmlns:rawvoice="http://www.rawvoice.com/rawvoiceRssModule/"
	>
<channel>
	<title>Comments on: Writing to a log file in C#</title>
	<atom:link href="http://www.itauthor.com/2007/08/21/writing-to-a-log-file-in-c/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.itauthor.com/2007/08/21/writing-to-a-log-file-in-c/</link>
	<description>Stuff about technical writing and software</description>
	<lastBuildDate>Sat, 04 Feb 2012 23:42:54 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Chris</title>
		<link>http://www.itauthor.com/2007/08/21/writing-to-a-log-file-in-c/comment-page-1/#comment-7701</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Wed, 28 Dec 2011 21:08:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.itauthor.com/wordpress/2007/08/21/writing-to-a-log-file-in-c/#comment-7701</guid>
		<description>Just a test:  &quot;c:\\testDirectory\\logfile.txt&quot; </description>
		<content:encoded><![CDATA[<p>Just a test:  &quot;c:\\testDirectory\\logfile.txt&quot;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://www.itauthor.com/2007/08/21/writing-to-a-log-file-in-c/comment-page-1/#comment-7700</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Wed, 28 Dec 2011 21:05:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.itauthor.com/wordpress/2007/08/21/writing-to-a-log-file-in-c/#comment-7700</guid>
		<description>Hmmm, there are supposed to be 2 backslashes between c:  and testDirectory, and 2 between testDirectory and logfile.txt. </description>
		<content:encoded><![CDATA[<p>Hmmm, there are supposed to be 2 backslashes between c:  and testDirectory, and 2 between testDirectory and logfile.txt.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://www.itauthor.com/2007/08/21/writing-to-a-log-file-in-c/comment-page-1/#comment-7699</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Wed, 28 Dec 2011 21:03:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.itauthor.com/wordpress/2007/08/21/writing-to-a-log-file-in-c/#comment-7699</guid>
		<description>For example, change &quot;logfile.txt&quot; to &quot;c:\testDirectory\logfile.txt&quot; in the original code.  I believe if you don&#039;t use a full path then it defaults to the location of the executable.  Thoughts anyone? </description>
		<content:encoded><![CDATA[<p>For example, change &quot;logfile.txt&quot; to &quot;c:\testDirectory\logfile.txt&quot; in the original code.  I believe if you don&#039;t use a full path then it defaults to the location of the executable.  Thoughts anyone?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Johan</title>
		<link>http://www.itauthor.com/2007/08/21/writing-to-a-log-file-in-c/comment-page-1/#comment-7692</link>
		<dc:creator>Johan</dc:creator>
		<pubDate>Wed, 07 Dec 2011 21:51:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.itauthor.com/wordpress/2007/08/21/writing-to-a-log-file-in-c/#comment-7692</guid>
		<description>how do u change the location where the file is created? </description>
		<content:encoded><![CDATA[<p>how do u change the location where the file is created?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: A. Coder</title>
		<link>http://www.itauthor.com/2007/08/21/writing-to-a-log-file-in-c/comment-page-1/#comment-7691</link>
		<dc:creator>A. Coder</dc:creator>
		<pubDate>Tue, 06 Dec 2011 11:09:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.itauthor.com/wordpress/2007/08/21/writing-to-a-log-file-in-c/#comment-7691</guid>
		<description>Need to use this in a static context... 
        static string strLogText = &quot;Default string to log&quot;;  static StreamWriter LogWriter;    
public static void LogToFile(string message) 
        { 
            try 
            {    
                if (!File.Exists(&quot;LogFile.txt&quot;)) { LogWriter = new StreamWriter(&quot;LogFile.txt&quot;); } 
                else { LogWriter = File.AppendText(&quot;LogFile.txt&quot;); } 
                LogWriter.WriteLine(string.IsNullOrEmpty(message) ? strLogText : message); 
                LogWriter.Flush(); 
            } 
            catch (Exception) {  } 
            finally {  if (LogWriter != null) {  LogWriter.Close(); }  } 
        } </description>
		<content:encoded><![CDATA[<p>Need to use this in a static context...<br />
        static string strLogText = &quot;Default string to log&quot;;  static StreamWriter LogWriter;<br />
public static void LogToFile(string message)<br />
        {<br />
            try<br />
            {<br />
                if (!File.Exists(&quot;LogFile.txt&quot;)) { LogWriter = new StreamWriter(&quot;LogFile.txt&quot;); }<br />
                else { LogWriter = File.AppendText(&quot;LogFile.txt&quot;); }<br />
                LogWriter.WriteLine(string.IsNullOrEmpty(message) ? strLogText : message);<br />
                LogWriter.Flush();<br />
            }<br />
            catch (Exception) {  }<br />
            finally {  if (LogWriter != null) {  LogWriter.Close(); }  }<br />
        }</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tanvir</title>
		<link>http://www.itauthor.com/2007/08/21/writing-to-a-log-file-in-c/comment-page-1/#comment-7690</link>
		<dc:creator>tanvir</dc:creator>
		<pubDate>Fri, 02 Dec 2011 13:47:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.itauthor.com/wordpress/2007/08/21/writing-to-a-log-file-in-c/#comment-7690</guid>
		<description>brilliant, thts wht i was looking for..wil share it....  </description>
		<content:encoded><![CDATA[<p>brilliant, thts wht i was looking for..wil share it....</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: .NetStarter</title>
		<link>http://www.itauthor.com/2007/08/21/writing-to-a-log-file-in-c/comment-page-1/#comment-7689</link>
		<dc:creator>.NetStarter</dc:creator>
		<pubDate>Wed, 30 Nov 2011 01:03:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.itauthor.com/wordpress/2007/08/21/writing-to-a-log-file-in-c/#comment-7689</guid>
		<description>Exactly what I was looking for..  Thx a lot! </description>
		<content:encoded><![CDATA[<p>Exactly what I was looking for..  Thx a lot!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vijay</title>
		<link>http://www.itauthor.com/2007/08/21/writing-to-a-log-file-in-c/comment-page-1/#comment-7662</link>
		<dc:creator>Vijay</dc:creator>
		<pubDate>Fri, 07 Oct 2011 06:44:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.itauthor.com/wordpress/2007/08/21/writing-to-a-log-file-in-c/#comment-7662</guid>
		<description>Thanks for sharing!  </description>
		<content:encoded><![CDATA[<p>Thanks for sharing!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: AngieM</title>
		<link>http://www.itauthor.com/2007/08/21/writing-to-a-log-file-in-c/comment-page-1/#comment-7653</link>
		<dc:creator>AngieM</dc:creator>
		<pubDate>Tue, 06 Sep 2011 15:54:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.itauthor.com/wordpress/2007/08/21/writing-to-a-log-file-in-c/#comment-7653</guid>
		<description>Thanks for sharing! </description>
		<content:encoded><![CDATA[<p>Thanks for sharing!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: HariGeek</title>
		<link>http://www.itauthor.com/2007/08/21/writing-to-a-log-file-in-c/comment-page-1/#comment-7651</link>
		<dc:creator>HariGeek</dc:creator>
		<pubDate>Mon, 05 Sep 2011 08:12:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.itauthor.com/wordpress/2007/08/21/writing-to-a-log-file-in-c/#comment-7651</guid>
		<description>i will definitely  promote.... that&#039;s the thing , i was looking for... thanks for sharing ...:) </description>
		<content:encoded><![CDATA[<p>i will definitely  promote.... that&#039;s the thing , i was looking for... thanks for sharing ...:)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ajay</title>
		<link>http://www.itauthor.com/2007/08/21/writing-to-a-log-file-in-c/comment-page-1/#comment-7647</link>
		<dc:creator>Ajay</dc:creator>
		<pubDate>Mon, 22 Aug 2011 10:17:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.itauthor.com/wordpress/2007/08/21/writing-to-a-log-file-in-c/#comment-7647</guid>
		<description>This is really very nice....Exactly  want i am looking for thnq so much!!! </description>
		<content:encoded><![CDATA[<p>This is really very nice....Exactly  want i am looking for thnq so much!!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: theGenius!</title>
		<link>http://www.itauthor.com/2007/08/21/writing-to-a-log-file-in-c/comment-page-1/#comment-7646</link>
		<dc:creator>theGenius!</dc:creator>
		<pubDate>Sun, 21 Aug 2011 15:31:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.itauthor.com/wordpress/2007/08/21/writing-to-a-log-file-in-c/#comment-7646</guid>
		<description>thankx :) </description>
		<content:encoded><![CDATA[<p>thankx :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: olish</title>
		<link>http://www.itauthor.com/2007/08/21/writing-to-a-log-file-in-c/comment-page-1/#comment-7645</link>
		<dc:creator>olish</dc:creator>
		<pubDate>Thu, 11 Aug 2011 12:59:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.itauthor.com/wordpress/2007/08/21/writing-to-a-log-file-in-c/#comment-7645</guid>
		<description>thanx! </description>
		<content:encoded><![CDATA[<p>thanx!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Or Levy</title>
		<link>http://www.itauthor.com/2007/08/21/writing-to-a-log-file-in-c/comment-page-1/#comment-7630</link>
		<dc:creator>Or Levy</dc:creator>
		<pubDate>Wed, 22 Jun 2011 07:31:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.itauthor.com/wordpress/2007/08/21/writing-to-a-log-file-in-c/#comment-7630</guid>
		<description>simple and working cant ask for more </description>
		<content:encoded><![CDATA[<p>simple and working cant ask for more</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eli</title>
		<link>http://www.itauthor.com/2007/08/21/writing-to-a-log-file-in-c/comment-page-1/#comment-7612</link>
		<dc:creator>Eli</dc:creator>
		<pubDate>Sat, 14 May 2011 19:39:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.itauthor.com/wordpress/2007/08/21/writing-to-a-log-file-in-c/#comment-7612</guid>
		<description>Exactly what I&#039;m looking for, big 10x! </description>
		<content:encoded><![CDATA[<p>Exactly what I&#039;m looking for, big 10x!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Yoav</title>
		<link>http://www.itauthor.com/2007/08/21/writing-to-a-log-file-in-c/comment-page-1/#comment-7606</link>
		<dc:creator>Yoav</dc:creator>
		<pubDate>Wed, 20 Apr 2011 15:35:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.itauthor.com/wordpress/2007/08/21/writing-to-a-log-file-in-c/#comment-7606</guid>
		<description>Thanks a lot.  </description>
		<content:encoded><![CDATA[<p>Thanks a lot.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Deepak Jose Lopez</title>
		<link>http://www.itauthor.com/2007/08/21/writing-to-a-log-file-in-c/comment-page-1/#comment-7533</link>
		<dc:creator>Deepak Jose Lopez</dc:creator>
		<pubDate>Thu, 24 Feb 2011 20:46:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.itauthor.com/wordpress/2007/08/21/writing-to-a-log-file-in-c/#comment-7533</guid>
		<description>Quick search, the correct result. I feel good with your website. Gonna promote.. </description>
		<content:encoded><![CDATA[<p>Quick search, the correct result. I feel good with your website. Gonna promote..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mahesh</title>
		<link>http://www.itauthor.com/2007/08/21/writing-to-a-log-file-in-c/comment-page-1/#comment-7391</link>
		<dc:creator>mahesh</dc:creator>
		<pubDate>Tue, 21 Dec 2010 12:13:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.itauthor.com/wordpress/2007/08/21/writing-to-a-log-file-in-c/#comment-7391</guid>
		<description>Thank a lot.. </description>
		<content:encoded><![CDATA[<p>Thank a lot..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: itauthor</title>
		<link>http://www.itauthor.com/2007/08/21/writing-to-a-log-file-in-c/comment-page-1/#comment-7335</link>
		<dc:creator>itauthor</dc:creator>
		<pubDate>Wed, 24 Nov 2010 23:23:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.itauthor.com/wordpress/2007/08/21/writing-to-a-log-file-in-c/#comment-7335</guid>
		<description>ITauthor blog saves a life! That&#039;s a first.  
:-)  
Thanks for the comment.  </description>
		<content:encoded><![CDATA[<p>ITauthor blog saves a life! That&#039;s a first.<br />
:-)<br />
Thanks for the comment.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: andrej_gubin</title>
		<link>http://www.itauthor.com/2007/08/21/writing-to-a-log-file-in-c/comment-page-1/#comment-7331</link>
		<dc:creator>andrej_gubin</dc:creator>
		<pubDate>Tue, 23 Nov 2010 10:51:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.itauthor.com/wordpress/2007/08/21/writing-to-a-log-file-in-c/#comment-7331</guid>
		<description>you saved my life </description>
		<content:encoded><![CDATA[<p>you saved my life</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: obiora</title>
		<link>http://www.itauthor.com/2007/08/21/writing-to-a-log-file-in-c/comment-page-1/#comment-7240</link>
		<dc:creator>obiora</dc:creator>
		<pubDate>Thu, 24 Jun 2010 07:37:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.itauthor.com/wordpress/2007/08/21/writing-to-a-log-file-in-c/#comment-7240</guid>
		<description>Thanks a lot. exactly what i was looking for. nice work </description>
		<content:encoded><![CDATA[<p>Thanks a lot. exactly what i was looking for. nice work</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave</title>
		<link>http://www.itauthor.com/2007/08/21/writing-to-a-log-file-in-c/comment-page-1/#comment-1173</link>
		<dc:creator>Dave</dc:creator>
		<pubDate>Wed, 05 Sep 2007 06:49:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.itauthor.com/wordpress/2007/08/21/writing-to-a-log-file-in-c/#comment-1173</guid>
		<description>Why don&#039;t you just use log4net from Apache?</description>
		<content:encoded><![CDATA[<p>Why don't you just use log4net from Apache?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

