<?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: Write to a log file with PHP</title>
	<atom:link href="http://www.redips.net/php/write-to-log-file/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.redips.net/php/write-to-log-file/</link>
	<description>Techniques and Web Technologies</description>
	<lastBuildDate>Sat, 04 Feb 2012 16:29:46 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/</generator>
	<item>
		<title>By: dbunic</title>
		<link>http://www.redips.net/php/write-to-log-file/comment-page-2/#comment-5013</link>
		<dc:creator>dbunic</dc:creator>
		<pubDate>Sat, 04 Feb 2012 16:29:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.redips.net/?p=36#comment-5013</guid>
		<description>@bhowe - &lt;em&gt;Logging class&lt;/em&gt; now contains &lt;strong&gt;lclose&lt;/strong&gt; public method - thank you.

@Kay - You are right. If &lt;em&gt;Logging class&lt;/em&gt; is used on Windows then CR and LF shoud be used to break the line. Linux/Unix uses only LF. I added &quot;\r\n&quot; to the comment above &lt;strong&gt;fwrite&lt;/strong&gt; line.

Info: From this moment, source code of the &lt;em&gt;Logging class&lt;/em&gt; can be downloaded from the &lt;em&gt;Download&lt;/em&gt; link below post title.</description>
		<content:encoded><![CDATA[<p>@bhowe - <em>Logging class</em> now contains <strong>lclose</strong> public method - thank you.</p>
<p>@Kay - You are right. If <em>Logging class</em> is used on Windows then CR and LF shoud be used to break the line. Linux/Unix uses only LF. I added "\r\n" to the comment above <strong>fwrite</strong> line.</p>
<p>Info: From this moment, source code of the <em>Logging class</em> can be downloaded from the <em>Download</em> link below post title.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kay</title>
		<link>http://www.redips.net/php/write-to-log-file/comment-page-2/#comment-5011</link>
		<dc:creator>Kay</dc:creator>
		<pubDate>Sat, 04 Feb 2012 15:11:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.redips.net/?p=36#comment-5011</guid>
		<description>Very useful, but would give better output for windows with each message on a new line by adding &quot; /r&quot; in the fwrite() function. that is: 

&lt;pre class=&quot;brush:php&quot;&gt;
fwrite($this-&gt;fp, &quot;$time ($script_name) $message\r\n&quot;);
&lt;/pre&gt;

EXAMPLE OUTPUT:

&lt;pre class=&quot;brush:text&quot;&gt;
16:03:15 (preview) Test message
16:03:35 (preview) Test message
16:03:50 (preview) Test message
&lt;/pre&gt;

I used it thanks</description>
		<content:encoded><![CDATA[<p>Very useful, but would give better output for windows with each message on a new line by adding " /r" in the fwrite() function. that is: </p>
<pre class="brush:php">
fwrite($this-&gt;fp, "$time ($script_name) $message\r\n");
</pre>
<p>EXAMPLE OUTPUT:</p>
<pre class="brush:text">
16:03:15 (preview) Test message
16:03:35 (preview) Test message
16:03:50 (preview) Test message
</pre>
<p>I used it thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: devidas</title>
		<link>http://www.redips.net/php/write-to-log-file/comment-page-2/#comment-4996</link>
		<dc:creator>devidas</dc:creator>
		<pubDate>Mon, 30 Jan 2012 05:31:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.redips.net/?p=36#comment-4996</guid>
		<description>This is nice code I was implement in my project. Thanx so much</description>
		<content:encoded><![CDATA[<p>This is nice code I was implement in my project. Thanx so much</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mathou</title>
		<link>http://www.redips.net/php/write-to-log-file/comment-page-2/#comment-4931</link>
		<dc:creator>Mathou</dc:creator>
		<pubDate>Fri, 13 Jan 2012 18:17:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.redips.net/?p=36#comment-4931</guid>
		<description>Nice, Thanks.</description>
		<content:encoded><![CDATA[<p>Nice, Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bhowe</title>
		<link>http://www.redips.net/php/write-to-log-file/comment-page-2/#comment-4748</link>
		<dc:creator>bhowe</dc:creator>
		<pubDate>Sat, 03 Dec 2011 18:40:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.redips.net/?p=36#comment-4748</guid>
		<description>Shouldn&#039;t you always implicitly close file handles or am I just paranoid ( or blind) .  Nice little class though Ill add it to my arsenal.</description>
		<content:encoded><![CDATA[<p>Shouldn't you always implicitly close file handles or am I just paranoid ( or blind) .  Nice little class though Ill add it to my arsenal.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: log file &#171; Menatap Cakrawala</title>
		<link>http://www.redips.net/php/write-to-log-file/comment-page-1/#comment-4453</link>
		<dc:creator>log file &#171; Menatap Cakrawala</dc:creator>
		<pubDate>Thu, 15 Sep 2011 04:17:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.redips.net/?p=36#comment-4453</guid>
		<description>[...] we make a simple log file using php and refer to this [...]</description>
		<content:encoded><![CDATA[<p>[...] we make a simple log file using php and refer to this [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tonys Tech Blog&#187; Blog Archive &#187; PHP mySQL osCmax and converting databases</title>
		<link>http://www.redips.net/php/write-to-log-file/comment-page-1/#comment-4379</link>
		<dc:creator>Tonys Tech Blog&#187; Blog Archive &#187; PHP mySQL osCmax and converting databases</dc:creator>
		<pubDate>Tue, 23 Aug 2011 11:02:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.redips.net/?p=36#comment-4379</guid>
		<description>[...] the hunt for error logging and reporting and a great start is this post about a Logging class from http://www.redips.net/php/write-to-log-file/ that I have left as is and it works a [...]</description>
		<content:encoded><![CDATA[<p>[...] the hunt for error logging and reporting and a great start is this post about a Logging class from <a href="http://www.redips.net/php/write-to-log-file/" rel="nofollow">http://www.redips.net/php/write-to-log-file/</a> that I have left as is and it works a [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mediafirehunt</title>
		<link>http://www.redips.net/php/write-to-log-file/comment-page-1/#comment-3977</link>
		<dc:creator>mediafirehunt</dc:creator>
		<pubDate>Tue, 07 Jun 2011 20:32:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.redips.net/?p=36#comment-3977</guid>
		<description>nice post very usefull</description>
		<content:encoded><![CDATA[<p>nice post very usefull</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Resti Guay</title>
		<link>http://www.redips.net/php/write-to-log-file/comment-page-1/#comment-3889</link>
		<dc:creator>Resti Guay</dc:creator>
		<pubDate>Thu, 19 May 2011 03:06:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.redips.net/?p=36#comment-3889</guid>
		<description>Thanks for sharing this greate work!

Optionally you can add this function to close the file pointer.

&lt;pre class=&quot;brush:php&quot;&gt;
private function __destruct() {
    fclose($this-&gt;fp);
}
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Thanks for sharing this greate work!</p>
<p>Optionally you can add this function to close the file pointer.</p>
<pre class="brush:php">
private function __destruct() {
    fclose($this-&gt;fp);
}
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: FD</title>
		<link>http://www.redips.net/php/write-to-log-file/comment-page-1/#comment-3769</link>
		<dc:creator>FD</dc:creator>
		<pubDate>Sat, 16 Apr 2011 07:45:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.redips.net/?p=36#comment-3769</guid>
		<description>Thanks for sharing! Works fine.</description>
		<content:encoded><![CDATA[<p>Thanks for sharing! Works fine.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

