<?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>Thu, 23 May 2013 16:40:53 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[PHPMaster.com: Implementing PSR-3 with log4php]]></title>
      <guid>http://www.phpdeveloper.org/news/19039</guid>
      <link>http://www.phpdeveloper.org/news/19039</link>
      <description><![CDATA[<p>
With the <a href="https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md">PSR-3</a> logging interface recently accepted by the PHP-FIG, <i>Jamie Munro</i> has written up a post for PHPMaster.com that shows how to <a href="http://phpmaster.com/implementing-psr-3-with-log4php/">implement the interface with log4php</a>, the <a href="http://logging.apache.org/log4php/">Apache logging tool</a>.
</p>
<blockquote>
With the recent passage of PSR-3, a standard for a common interface for logging libraries, it seems appropriate to discuss the implementation with my favorite logging library. log4php is an open source Apache project that is a very versatile logging framework. Through log4php's configuration files, logging has a variety of output locations, so it's possible to send specific log levels to different output locations. 
</blockquote>
<p>
He includes the Composer requirements for the interface and shares the code for a wrapper class that implements the Logger interface and defines methods for each of the logging levels (alert, notice, debug, etc). Also in the post is an example XML configuration for log4php and how to load it into your class instance.
</p>]]></description>
      <pubDate>Tue, 15 Jan 2013 12:53:17 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Community News: PSR-3 Accepted - Logger Interface]]></title>
      <guid>http://www.phpdeveloper.org/news/19037</guid>
      <link>http://www.phpdeveloper.org/news/19037</link>
      <description><![CDATA[<p>
The PHP-FIG  (Framework Interoperability Group) has recently <a href="https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md">accepted the PSR-3 definition</a> for a standardized Logger interface structure that can be used for interoperability between frameworks (and other tools).
</p>
<blockquote>
The main goal is to allow libraries to receive a PsrLogLoggerInterface object and write logs to it in a simple and universal way. Frameworks and CMSs that have custom needs MAY extend the interface for their own purpose, but SHOULD remain compatible with this document. This ensures that the third-party libraries an application uses can write to the centralized application logs.
</blockquote>
<p>
The <a href="https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md">implementation of this structure</a> into your application makes it easier should you decide to swap out logging tools or want to create your own that can be used across several different frameworks. This is the third PSR to be accepted by the group, following <a href="https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-1-basic-coding-standard.md">PSR-1</a> and <a href="https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md">PSR-2</a> more related to coding standards.
</p>]]></description>
      <pubDate>Tue, 15 Jan 2013 10:55:01 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Stuart Herbert: Personal Thoughts On The PSR-3 Log Proposal]]></title>
      <guid>http://www.phpdeveloper.org/news/18971</guid>
      <link>http://www.phpdeveloper.org/news/18971</link>
      <description><![CDATA[<p>
In his latest post, <i>Stuart Herbert</i> has <a href="http://blog.stuartherbert.com/php/2012/12/29/personal-thoughts-on-the-psr-3-log-proposal/">shared some thoughts</a> about the recently proposed PSR-3 proposal for a unified logging interface for PHP projects.
</p>
<blockquote>
PSR-3 is a proposed standard (<a href="https://groups.google.com/forum/?fromgroups=#!topic/php-fig/d0yPC7jWPAE">voting</a> has finished, it should appear as an accepted standard when the PSR folks recover from too much Christmas turkey) describing a common logging interface for PHP frameworks. It's based on a small subsection of <a href="http://tools.ietf.org/html/rfc5424">RFC 5424</a>, which describes the Syslog standard, which is a very sensible choice. Sysadmins think in terms of Syslog levels, and they utterly hate dealing with loggers that don't map cleanly onto Syslog.
</blockquote>
<p>
He briefly introduces the PSR and the format of the logger with some of the main methods it should implement and what they do. He talk gets into some of his critiques about the proposal, namely the method naming, the exception handling parameter and the proposed LogLevel constants.
</p>]]></description>
      <pubDate>Mon, 31 Dec 2012 10:46:13 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[ThinkPHP Blog: MySQLnd Plugins: Writing a MySQL Query Logger in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/14981</guid>
      <link>http://www.phpdeveloper.org/news/14981</link>
      <description><![CDATA[<p>
On the ThinkPHP blog there's <a href="http://blog.mayflower.de/archives/578-MySQLnd-Plugins-Writing-a-MySQL-Query-Logger-in-PHP.html">a recent post</a> looking at writing a query logger in PHP as a mysqlnd plugin using the <a href="http://pecl.php.net/package/mysqlnd_uh/">mysqlnd_uh</a> extension.
</p>
<blockquote>
A new approach to implementing a query logger and potentially more complex features such as monitoring or read/write-splitting is the MySQLnd Userland Handler Extension (mysqlnd_uh, <a href="http://pecl.php.net/package/mysqlnd_uh/">pecl website</a>). The extension lets you register a PHP class as a proxy for every <a href="http://docs.php.net/manual/en/book.mysqlnd.php">MySQLnd</a> connection. Every call to a function to MySQLnd (usually indirect through mysqli, mysql, pdo_mysql) is passed to the PHP class, which then calls the original MySQLnd function.
</blockquote>
<p>
They give a simple example to start - a logging function and how to configure it - followed by a more real-world scenario of logging inside of a project plugin.
</p>]]></description>
      <pubDate>Wed, 18 Aug 2010 11:10:15 -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>
    <item>
      <title><![CDATA[Raphael Stolt's Blog: Turning a Zend_Log log file into a RSS feed]]></title>
      <guid>http://www.phpdeveloper.org/news/8123</guid>
      <link>http://www.phpdeveloper.org/news/8123</link>
      <description><![CDATA[<p>
In a <a href="http://raphaelstolt.blogspot.com/2007/06/turning-zendlog-log-file-into-rss-feed.html">new post</a> to his blog today, <i>Raphael Stolt</i> shows how to take the output from the Zend_Log component of the Zend Framework and, with a bit of custom coding, make it output an RSS feed.
</p>
<blockquote>
Whilst touring the web I found an interesting <a href="http://www.simonecarletti.com/code/apachelog2feed/">project</a> for turning Apache Web Server log files into RSS feeds. This approach can be adjusted to monitor the maintenance needs of a web application deployed on an assumed productive system. Therefor a XML capable <a href="http://framework.zend.com/manual/en/zend.log.html">Zend_Log</a> instance will be set up and the resulting log file will be transformed into a RSS feed via a custom <a href="http://framework.zend.com/manual/en/zend.controller.actionhelpers.html">Action Helper</a> wrapping a XSLT transfomation.
</blockquote>
<p>
He sets up the XML logger first, using the Zend_Log, Zend_Log_Writer_Stream and Zend_Log_Formatter_Xml to create the XML output from the logging. Then, with the help of the custom helper - Recordshelf_Controller_Action_Helper_Xslt - he reformats the XML output into an RSS feed ready for public consumption. (There's even <A href="http://farm2.static.flickr.com/1245/626281306_4d13890519_o.png">a screenshot</a> of what it might look like in a feed reader).
</p>]]></description>
      <pubDate>Tue, 26 Jun 2007 08:33:00 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Northclick Blog: Getting the PHP fatal errors]]></title>
      <guid>http://www.phpdeveloper.org/news/7843</guid>
      <link>http://www.phpdeveloper.org/news/7843</link>
      <description><![CDATA[<p>
From the Nothclick dev blog, there's <a href="http://blog.northclick.de/archives/17">this new post</a> from <i> Soenke Ruempler</i> that talks about working with error messages in PHP, specifically with fatal errors.
</p>
<blockquote>
One big issue of the PHP error handling is that there's no built-in way to catch fatal errors with an user-defined error handler. So I thought a little bit about it and maybe you have better approaches or solutions...
</blockquote>
<p>
With the goal of emailing the developers when such an error is thrown, he comes up with three different "storage methods" - using syslog, sapi, or a common logfile - and two different methods for watching them - file watching and syslogger. He works through these two options, trying to figure out which out be the simplest to implement.
</p>
<p>
He comes to the conclusion, though, that he might just be better off with one of the packages already out there to do something similar. Of the four he found, <a href="http://sourceforge.net/projects/swatch/">Swatch</a> seemed to fit the best. He includes configuration and setup info to illustrate.
</p>]]></description>
      <pubDate>Tue, 15 May 2007 07:49:00 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[DevShed: Expanding an Error Logger with the Chain of Responsibility Pattern]]></title>
      <guid>http://www.phpdeveloper.org/news/6692</guid>
      <link>http://www.phpdeveloper.org/news/6692</link>
      <description><![CDATA[<p>
Finishing off their look at the "chain of responsibility", DevShed has posted <a href="http://www.devshed.com/c/a/PHP/Expanding-an-Error-Logger-with-the-Chain-of-Responsibility-Pattern/">part three</a> of the series - expanding on the code that they produced in the past, they add more functionality to their error logger.
</p>
<blockquote>
Now, paying attention to the topics that will be covered in this tutorial, what you'll learn here will consist essentially of applying the chain of responsibility schema to expand the capacity of the error logging system that was developed  previously.
</blockquote>
<p>
They take a look back at what they produced in the previous tutorial (the simple error logger) and show how to <a href="http://www.devshed.com/c/a/PHP/Expanding-an-Error-Logger-with-the-Chain-of-Responsibility-Pattern/">expand on it</a> by adding functionality to log errors to a file. The finish it off by showing how to implement it all in a simple script.
</p>]]></description>
      <pubDate>Mon, 13 Nov 2006 10:57:00 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[DevShed: Building an Error Logger with the Chain of Responsibility Pattern in PHP 5]]></title>
      <guid>http://www.phpdeveloper.org/news/6649</guid>
      <link>http://www.phpdeveloper.org/news/6649</link>
      <description><![CDATA[<p>
With the next link in their look at the "chain of responsibility" pattern, DevShed has posted <a href="http://www.devshed.com/c/a/PHP/Building-an-Error-Logger-with-the-Chain-of-Responsibility-Pattern-in-PHP-5/">this new part</a> in the series - adding an error logger to the mix.
</p>
<blockquote>
At the end of this article you should be equipped with more robust knowledge of how to create a responsibility chain between PHP objects that perform truly useful tasks, like logging errors to specific components of a Web application.
</blockquote>
<p>
They work from the code built up in the previous installations and <a href="http://www.devshed.com/c/a/PHP/Building-an-Error-Logger-with-the-Chain-of-Responsibility-Pattern-in-PHP-5/">show how</a> to add the foundations of the error logger to the class before moving on to the more advanced bits. They then show how to use it to log some basic errors and, using only a bit more skill, logging some email-related errors.
</p>]]></description>
      <pubDate>Mon, 06 Nov 2006 10:32:00 -0600</pubDate>
    </item>
  </channel>
</rss>
