ZF2-535: The Log module is not ServiceManager friendly

Description

Using a configuration array to wire up a global logger is currently obtuse. Writers construct signatures vary too much to be practical. Here's what I want to do in my autoload/global.php:


array(
    'logger' => array(
        'writers' => array(
            'Stream' => array(
                'streamOrUrl' => 'log/application.log',
            ),
        ),
    ),
);

Now, I can write a custom Factory just for that Writer. But, as soon as I try to make it generic for any writer, I run into signature hell. I haven't even begun to try to config filters or formatters.

See: http://logging.apache.org/log4php/docs/…

Comments

Also, regarding the tutorial project: Who starts any project without logging? Only amateurs.

What is your problem exactly? Can you add the actual config to compare with the expected config?

I don't see something different in log4php, if you take two appenders like File and PDO: you need to define dsn for PDO, and file for File.

Where is an example of the current recommended service manager config for a global logger with multiple writers? If you can provide a clean example, then this issue can be closed.

This issue has been closed on Jira and moved to GitHub for issue tracking. To continue following the resolution of this issues, please visit: https://github.com/zendframework/zf2/issues/2568