A ZF3 module to log data using Zend\Log and write them to ZendDeveloperTools toolbar.
A ZF3 module to log data using Zend\Log and write them to ZendDeveloperTools toolbar. If you already have a logger in your application (that is an instance of
Zend\Log\Logger) it will integrate well with it so you still will only have to use your logger.
The easiest way is by using composer. Just add
"jhuet/zdt-logger-module": "dev-master" (or
"jhuet/zdt-logger-module": "0.3" for last stable version) as a requirement in your
composer.json file and it will be automatically downloaded next time you do
Jhu\ZdtLoggerModule in the list of activated modules of your
Configuration options are available in
config/jhu-zdt-logger.global.php.dist file. If you want to change the default ones, copy it in your
config/autoload directory, remove the
.dist extension and edit it.
Options available :
logger: This module will by default create a
Zend\Log\Loggerand add a writer to it. If you already have a logger in your application, you can set it here so it will be used instead of creating a new one. The logger you'll set here has to be available thru the service manager.
If you don't already have a logger in your application, you may refere to this one any time you need to via the service manager with the
jhu.zdt_logger key. Assuming
$sm is the service maanger, you could call
$sm->get('jhu.zdt_logger')->info('my log'); to log with the
If you already have a logger in your application and you have set it in the options, you just have to use your regular logger as you normally would and anything logged will be added to the ZendDeveloperTools toolbar.