<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Sat, 18 May 2013 21:09:45 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Slawek Lukasiewicz's Blog: Zend Framework: logging with Firebug and FirePHP]]></title>
      <guid>http://www.phpdeveloper.org/news/16375</guid>
      <link>http://www.phpdeveloper.org/news/16375</link>
      <description><![CDATA[<p>
<i>Slawek Lukasiewicz</i> has <a href="http://www.leftjoin.net/2011/05/zend-framework-logging-with-firebug-and-firephp/">a new post</a> to his blog today showing you how to use the popular <a href="http://getfirebug.com/">Firebug</a> extension for Firefox with the <a href="http://www.firephp.org/">FirePHP</a> plugin to make error logging simpler and less obtrusive without ever having to leave the browser.
</p>
<blockquote>
If you use Firefox, I bet you already know <a href="http://getfirebug.com/">Firebug</a> extension. This is irreplaceable tool for web development. But there is also <a href="http://www.firephp.org/">FirePHP</a> extension, which provides possibility to log into Firebug console from PHP scripts. This is very convenient way for debugging process, because logs are independent from application output.
</blockquote>
<p>
He shows the integration you can do with the Zend Framework's <a href="http://framework.zend.com/manual/en/zend.log.overview.html">Zend_Log</a> component to write basic messages and the <a href="http://framework.zend.com/manual/en/zend.wildfire.chapter.html">Zend_Wildfire</a> component to write tabular data back to your browser's console with two snippets of code.
</p>]]></description>
      <pubDate>Tue, 24 May 2011 09:44:46 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Josh Adell's Blog: Logging User Sessions Across Requests]]></title>
      <guid>http://www.phpdeveloper.org/news/16366</guid>
      <link>http://www.phpdeveloper.org/news/16366</link>
      <description><![CDATA[<p>
<i>Josh Adell</i> has a new post to the Everyman Software blog talking about a solution he and his team have developed for <a href="http://blog.everymansoftware.com/2011/05/logging-user-sessions-across-requests.html">logging user sessions across requests</a> with the help of the Zend_Log component and a custom logging formatter.
</p>
<blockquote>
One way to handle this is to put a request-specific identifier in every log message. But I shouldn't have to remember to append or prepend the identifier to their log messages. I'd rather have it happen automatically, without me or my teammates having to think about it. Here's a method we've been using to try and untangle the mess and retain the usefulness of our logs. The code uses Zend's logging component, but can easily be adapted to other log systems.
</blockquote>
<p>
Their example sets a custom log format message with placeholders for a timestamp, log ID number and the log message. A unique ID is then generated for the user's session and applied to the Zend_Log object. This data is then automatically applied to the log file's output without any extra hassle. The full sample code (pretty simple, really) is included.
</p>]]></description>
      <pubDate>Fri, 20 May 2011 09:10:06 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Ole Markus' Blog: Catching fatal errors in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/16031</guid>
      <link>http://www.phpdeveloper.org/news/16031</link>
      <description><![CDATA[<p>
<i>Ole Markus</i> has a new post today looking at how you can <a href="http://olemarkus.org/2011/03/catching-fatal-errors-in-php/">catch fatal errors</a> in your PHP applications a bit more gracefully than the usual failure messages.
</p>
<blockquote>
In dynamic languages like PHP [errors like E_ERROR and E_PARSE] happen all the time, for example when trying to call a method on a variable you assumed was an instance of a specific class, but which for some reason suddenly was not instantiated. Not only are they often not catched, but often it is also difficult to even know that they are occurring.
</blockquote>
<p>
His solution comes in the form of a built-in PHP function, <a href="http://php.net/register_shutdown_function">register_shutdown_function</a>, that executes when the PHP process is shutting down - errors or not. It takes in a callback method that has access to an exception object. You can get lots of interesting information from this object and, as in his example, log it to a file for future investigation.
</p>]]></description>
      <pubDate>Fri, 11 Mar 2011 09:16:42 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Kevin Shroeder's Blog: Zend_Log with multiple writers]]></title>
      <guid>http://www.phpdeveloper.org/news/15124</guid>
      <link>http://www.phpdeveloper.org/news/15124</link>
      <description><![CDATA[<p>
<i>Kevin Schroeder</i> has <a href="http://www.eschrade.com/page/zend_log-with-multiple-writers-4c8aa4e1">a recent post to his blog</a> about a handy trick Zend Framework developers can use to have Zend_Log write out to multiple sources at once pretty easily.
</p>
<blockquote>
If you were not aware, Zend_Log provides facilities for writing to multiple logs through the same log instance.  Additionally, you can do this via configuration options when using a Zend_Application resource plugin.  Together those make for very powerful logging mechanisms.  "How?" you ask?  It's really easy.
</blockquote>
<p>
The trick lies in the application.ini file configuration. He includes an example of how you can set this up showing how to make two different environments log differently - development writes to log/firebug and production just writes to the log. He includes some sample code for a basic controller showing you how to use it.
</p>]]></description>
      <pubDate>Tue, 14 Sep 2010 10:39:34 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Zend Developer Zone: Zend_Log timestamp filter ]]></title>
      <guid>http://www.phpdeveloper.org/news/14813</guid>
      <link>http://www.phpdeveloper.org/news/14813</link>
      <description><![CDATA[<p>
On the Zend Developer Zone there's a recent post about a custom filter that's been developed to help <a href="http://devzone.zend.com/article/12318-Zend_Log-timestamp-filter-">filter events based on time</a> instead of just logging them as a whole.
</p>
<blockquote>
For one of my recent project, which is using <a href="http://framework.zend.com/manual/en/zend.log.html">Zend_Log</a> component of the Zend Framework, I had a demand in which I needed to be able to filter log events based on the time they occurred. As out of the box, Zend_Log component does not have such filter, I decided to create one that will fulfill my demands.
</blockquote>
<p>
The log filter, NP_Log_Filter_Timestamp, it allows you to set rules for things like hour, minute year, day of the week, etc. and can be used anywhere you'd create a normal Zend_Log instance. Pass it in the format you'd like to use (that <a href="http://php.net/idate">idate</a> can use), a value to evaluate and a comparison operator. Two code snippets show how it's used.
</p>]]></description>
      <pubDate>Mon, 19 Jul 2010 12:24:48 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[ZendCasts.com: Transparent Logging with Zend_Log]]></title>
      <guid>http://www.phpdeveloper.org/news/14663</guid>
      <link>http://www.phpdeveloper.org/news/14663</link>
      <description><![CDATA[<p>
New on the ZendCasts.com site, there's a <a href="http://www.zendcasts.com/transparent-logging-with-zend_log/2010/06/">screencast about using Zend_Log</a> to create a full logging framework for your Zend Framework-based application.
</p>
<blockquote>
I was working on a project for a client the other day and noticed a couple of lines in the ErrorController for automatically logging errors with Zend_Log. In 10 minutes, you can have a fully integrated logging framework. I also implement a singleton pattern for reusing your Zend_Log configuration (defined in the application.ini) anywhere else in your application.
</blockquote>
<p>
You can watch the screencast via the <a href="http://www.zendcasts.com/transparent-logging-with-zend_log/2010/06/">in-page player</a> and follow along with the code if you'd like to <a href="http://zendcasts.googlecode.com/svn/trunk/zc55-transparent-logging-with-zend-log/zc55-transparent-logging-with-zend-log.zip">download it from here</a>.
</p>]]></description>
      <pubDate>Thu, 17 Jun 2010 08:35:42 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[ZendCasts.com: Reporting with Zend_Tool and Zend_Log]]></title>
      <guid>http://www.phpdeveloper.org/news/14425</guid>
      <link>http://www.phpdeveloper.org/news/14425</link>
      <description><![CDATA[<p>
On the ZendCasts.com site there's a new screencast continuing their look at the Zend_Tool component by <a href="http://www.zendcasts.com/reporting-with-zend_tool-and-zend_log/2010/04/">combining it with Zend_Log</a> to do some easy reporting.
</p>
<blockquote>
This video uses a collection of powerful PHP libraries in order to illustrate how easy it really is to build a command-line tool for reporting against XML files. We start off by logging visitor statistics in the controller into a log file with Zend_Log. Once data has been collected, we're then able to utilize SimpleXML, Zend_Date and the Zend_Tool component to build out a very simple reporting tool.
</blockquote>
<p>
He suggests one possible use is to create a cron job that will regenerate the reports nightly. You can view the screencast in <a href="http://www.zendcasts.com/reporting-with-zend_tool-and-zend_log/2010/04/">the post</a> or download <a href="http://zendcasts.googlecode.com/svn/trunk/zc54-reporting-with-zend-tool-and-zend-log/zc54-reporting-with-zend-tool-and-zend-log.zip">a copy of the project</a> to get started right away.
</p>]]></description>
      <pubDate>Wed, 28 Apr 2010 08:43:23 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Pablo Viquez's Blog: Zend_Log, FirePHP and Zend_Application. How to]]></title>
      <guid>http://www.phpdeveloper.org/news/13599</guid>
      <link>http://www.phpdeveloper.org/news/13599</link>
      <description><![CDATA[<p>
<i>Pablo Viquez</i> has <a href="http://www.pabloviquez.com/2009/11/zend_log-firebug-and-zend_application-another-how-to">written up a mini-tutorial</a> on getting your Zend Framework application's errors to log out to the Firebug panel (from the extension) with the help of FirePHP and Zend_Log.
</p>
<blockquote>
I wanted to enable logging of exceptions to my PHP log file and also display them using FireBug. On a standard setup of Zend Framework, the Zend error handler plugin (Zend_Controller_Plugin_ErrorHandler) enable by default [...] I wanted to keep using the error handler plugin and didn't want to log the exceptions by using: Zend_Controller_Front::throwExceptions() or Zend_Controller_Response_Abstract::renderExceptions() or any other way since eventually might get complicated, besides, I think that the error handler plugin works fine and if it gets updated in the future, I won't have to do a major refactor.
</blockquote>
<p>
He shows how to create the Zend_Log object to write out on the development system (based on the ini setting for the Zend Framework application), how to use it to send the log message out to the waiting client. Examples of the output - a screenshot of the Firebug panel and the error log output.
</p>]]></description>
      <pubDate>Mon, 30 Nov 2009 10:33:25 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Raphael Stolt's Blog: Logging to MongoDb and accessing log collections with Zend_Tool]]></title>
      <guid>http://www.phpdeveloper.org/news/13263</guid>
      <link>http://www.phpdeveloper.org/news/13263</link>
      <description><![CDATA[<p>
<i>Raphael Stolt</i> has <a href="http://raphaelstolt.blogspot.com/2009/09/logging-to-mongodb-and-accessing-log.html">written up a new tutorial</a> looking at connecting the <a href="http://www.mongodb.org/display/DOCS/Home">MongoDb</a> document-oriented database with the <a href="http://framework.zend.com/manual/en/zend.log.html">Zend_Log</a> component of the Zend Framework to push log entries into the database.
</p>
<blockquote>
I tinkered with the just recently discovered <a href="http://www.mongodb.org/display/DOCS/Home">MongoDb</a> and hooked it into the <a href="http://framework.zend.com/manual/en/zend.log.html">Zend_Log</a> environment by creating a dedicated Zend_Log_Writer. The following post will therefore present a peek at a prototypesque implementation of this writer and show how the afterwards accumulated log entries can be accessed and filtered with a custom Zend_Tool project provider.
</blockquote>
<p>
He extends the Zend_Log_Writer class to create the interface for the MongoDb and uses the <a href="http://php.net/manual/en/class.mongo.php">mongo interface</a> for PHP to bridge the gap. The application's INI file and Bootstrap are then modified to add in this new functionality and some example usage code is created both with and without the Zend_Tool tool.
</p>]]></description>
      <pubDate>Tue, 22 Sep 2009 09:49:47 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[phpRiot: Zend Framework 101: Zend_Log]]></title>
      <guid>http://www.phpdeveloper.org/news/12326</guid>
      <link>http://www.phpdeveloper.org/news/12326</link>
      <description><![CDATA[<p>
Next up in the phpRiot "Zend Framework 101" series is <a href="http://www.phpriot.com/articles/zend-log">this new look</a> at the logging component of the Zend Framework - Zend_Log.
</p>
<blockquote>
This article shows you how to use Zend_Log, the logging component of the Zend Framework. It allows you to record messages from your application however you please. In this article I will show you how to record messages to a log file. Additionally, if you use the Firebug and FirePHP plug-ins for Firefox, Zend_Log can be extremely useful for application development and debugging. I will also show you how to achieve this.
</blockquote>
<p>
They walk you through the creation of a <a href="http://www.phpriot.com/articles/zend-log/2">simple logger</a> and putting it to use by recording just the events you want (via error levels). There's also an extra section on integrating it with the Firebug/FirePHP extensions for Firefox and push your messages directly to the browser.
</p>]]></description>
      <pubDate>Mon, 13 Apr 2009 08:46:13 -0500</pubDate>
    </item>
  </channel>
</rss>
