I've downloaded the log4php and created a module named logger that will serve as a singleton reference for my skeleton zend 2 framework application. In application.config I registered the module "Logger" and have the following structure for my application:
module
- Other Modules "will use Logger"
Logger
- config
- module.config.php
- src
- log4php "renamed from php" code from log4php community
module.php
autoload_classmap.php
- config
module.config.php has:
"return array(
$options = array(
'writers' => array(
array(
'name' => 'stream',
'stream' => 'php://output',
'formatter' => 'simple',
),
array(
'name' => 'stream',
'stream' => 'application.log',
'formatter' => array(
'name' => 'simple',
'options' => array(
'format' => '%timestamp%'
),
),
'filters' => array(
array(
'name' => 'priority',
'options' => array(
'priority' => Logger::WARN
),
),
),
),
),
),
);"
moudle.php has: "getConfig() and getAutoloaderConfig() with 'Logger' => DIR . '/src/log4php/' . 'Logger"
autoload_classmap.php "returns area();"
QUESTION:
How can I auto register and use my "Logger" module. Any suggestions would be helpful, thanks!