O'Reilly logo

Zend Framework 2 Cookbook by Josephus Callaars

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Logging and how it makes your life easier

Besides good error handling, logging is a good way to make sure you get the most knowledge of what is going on out of your system. Most of time we can even build it so that we can record events that lead up to an error, which can then be traced back to the original issue.

Getting ready

Because we want to go all exotic with the logging in Zend Framework 2, it is required for us to install the FirePHP core on our web server. We can install this library through the Composer tool (we need to assume that we already use this on the server, otherwise it would get a bit too complicated).

We can install the FirePHP library by adding the following lines in the require section of the composer.json file:

"firephp/firephp-core" ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required