Application-level Logging with the Zend Framework
Hey last month, a new article appeared on A/R/T titled Application-level Logging with the Zend Framework Written by Stefan Koopmanschap, of TomTom, the article introducing the concepts behind application-level logging, why you should log, when you should log and on page 2, HOW you should log.
While the article centers around using the Zend Framework, the concepts involved can be applied to any PHP application.
Let’s steal a quick quote before anyone notices.
With every installation of PHP, there are several logs available. Your webserver will keep its own access log and error log, from which you can get quite some information that can be used for statistics on your users and possibly also debugging your website. Then php also has an error log, which is also very useful for debugging your code. All these logs are completely independent of your application: They’ll be there whether your application is or isn’t. They give very global information on your application, mainly when something goes wrong. If you want more detailed information on what your application is doing, then you won’t find that information in these logs. Your application is a black box. Something comes in, something happens, and then there is output. What can you do?
Stefan goes on to explain what you can do. Page 2 even includes sample code to show you how to do what you can do. This article is long on the “WHY” but still has enough “HOW” to make it interesting. Like all the other articles in A/R/T, it’s definitely worth the read.
=C=

Comments