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" : "dev-master"
If we now execute 'php composer.phar update'
in the command line, it will install the library for use within our code later on. To make full use of the logger functionality, it would also be wise to use a browser that can understand...