AopLogger is a module for Zend Framework 2 that allows for logging via Doctrine annotations using the Go! Aop framework
- While we are still testing you will need to add
"repositories": [ { "type":"vcs", "url":"https://github.com/VUHL/AopLogger.git" } ]
to yourcomposer.json
. - Add
"vu/AopLogger" : "dev-master"
to yourcomposer.json
and runphp composer.phar update
. - Add
AopLogger
to yourconfig/application.config.php
file under themodules
key.
AopLogger can be configured using the AopLogger
key in your module configuration. The following keys can be set with only the first being required.
Debug
-> when set totrue
this will enable the debug on Go! AopCache
-> defaulted to null, this can be pointed at a directory for caching the interwoven aspects rather than weaving at runtimeWhiteList
-> REQUIRED this should point to the source directory you wish to inject the aspectsCustomAspects
-> Any additional aspects you wish to add to the framework. This will be a list of keys which will be loaded from the service locatorDisabled
-> Defaults to false. This allows the application to disable the module for different levels of configuration. Example - functional testing with the module can cause some issues
// config/autoload/global.php
'AopLogger' => array(
'WhiteList' => array(__DIR__ . "/../../module/MyModule"),
'CustomAspects' => array(
'EchoAspect',
'MyControllerAspect'
)
)
The only aspect provided at the moment is DebugMethod. This aspect will log the entry point and exit points of any method annotated. This aspect will use the php://stderr
stream.
use AopLogger\Annotation\DebugMethod;
...
/**
* @DebugMethod
*/
function ..