<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Zendcasts Forum / zend_log]]></title>
		<link>http://www.zendcasts.com/forum/viewtopic.php?id=175</link>
		<description><![CDATA[The most recent posts in zend_log.]]></description>
		<lastBuildDate>Wed, 14 Apr 2010 19:49:17 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Re: zend_log]]></title>
			<link>http://www.zendcasts.com/forum/viewtopic.php?pid=795#p795</link>
			<description><![CDATA[<p>Thanks.&#160; &#160;that worked!</p>]]></description>
			<author><![CDATA[dummy@example.com (shaded2)]]></author>
			<pubDate>Wed, 14 Apr 2010 19:49:17 +0000</pubDate>
			<guid>http://www.zendcasts.com/forum/viewtopic.php?pid=795#p795</guid>
		</item>
		<item>
			<title><![CDATA[Re: zend_log]]></title>
			<link>http://www.zendcasts.com/forum/viewtopic.php?pid=794#p794</link>
			<description><![CDATA[<p>Zend_Registry::get(&#039;log&#039;)-&gt;info(&#039;whatever text&#039;);</p><p>Since you set it to the Zend_Registry just retrieve it from there. Thats how I use translations.<br />Hope this helps!</p>]]></description>
			<author><![CDATA[dummy@example.com (iznogood)]]></author>
			<pubDate>Wed, 14 Apr 2010 17:35:54 +0000</pubDate>
			<guid>http://www.zendcasts.com/forum/viewtopic.php?pid=794#p794</guid>
		</item>
		<item>
			<title><![CDATA[zend_log]]></title>
			<link>http://www.zendcasts.com/forum/viewtopic.php?pid=792#p792</link>
			<description><![CDATA[<p>Any one know how to set up zend log.&#160; This is what i have in the bootstrap</p><div class="codebox"><pre><code> protected function _initLogging()
    {
        $this-&gt;bootstrap(&#039;frontController&#039;);
        $logger = new Zend_Log();

        $writer = &#039;production&#039; == $this-&gt;getEnvironment() ?
            new Zend_Log_Writer_Stream(APPLICATION_PATH . &#039;/data/logs/app.log&#039;) :
            new Zend_Log_Writer_Firebug();
        $logger-&gt;addWriter($writer);

        /*if (&#039;production&#039; == $this-&gt;getEnvironment()) {
            $filter = new Zend_Log_Filter_Priority(Zend_Log::CRIT);
            $logger-&gt;addFilter($filter);
        }*/

        $this-&gt;_logger = $logger;
        Zend_Registry::set(&#039;log&#039;, $logger);
        
        
    }</code></pre></div><p>However im not really sure how to call it in my other files. </p><div class="codebox"><pre><code>$this-&gt;_logger-&gt;info(&#039;Bootstrap &#039; . __METHOD__);</code></pre></div><p>works if im calling in other bootstrap functions but not sure how to call outside of bootstrap.</p>]]></description>
			<author><![CDATA[dummy@example.com (shaded2)]]></author>
			<pubDate>Tue, 13 Apr 2010 16:41:35 +0000</pubDate>
			<guid>http://www.zendcasts.com/forum/viewtopic.php?pid=792#p792</guid>
		</item>
	</channel>
</rss>

