News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

PHPMaster.com:
Implementing PSR-3 with log4php
January 15, 2013 @ 12:53:17

With the PSR-3 logging interface recently accepted by the PHP-FIG, Jamie Munro has written up a post for PHPMaster.com that shows how to implement the interface with log4php, the Apache logging tool.

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.

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.

0 comments voice your opinion now!
implement psr3 logger interface log4php apache tutorial


blog comments powered by Disqus

Similar Posts

Evolt.org: Failover Database Connection with PHP + mySQL

Kevin Schroeder's Blog: Connecting to the Zend Developer Cloud using NetBeans for PHP

DevShed: Fetching Search Results as Serialized Arrays with Yahoo Web Services and PHP 5

PHPBuiilder.com: Using Get and Post Methodology in AJAX Applications

ApacheLounge.com: Memory usage Apache + PHP as module versus FastCGI


Community Events

Don't see your event here?
Let us know!


api opinion composer programming symfony interview part2 framework community list example php7 podcast yii2 introduction series laravel project application language

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework