Issue Type: Improvement Created: 2012-09-09T23:54:56.000+0000 Last Updated: 2012-10-08T20:14:36.000+0000 Status: Closed Fix version(s): Reporter: George Cooksey (bokgc) Assignee: Matthew Weier O'Phinney (matthew) Tags: - Zend\Log
Related issues: Attachments:
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:
<pre class="highlight"> 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.
Posted by George Cooksey (bokgc) on 2012-09-09T23:56:51.000+0000
Also, regarding the tutorial project: Who starts any project without logging? Only amateurs.
Posted by Benoît Durand (intiilapa) on 2012-09-11T19:03:37.000+0000
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.
Posted by George Cooksey (bokgc) on 2012-09-18T03:04:42.000+0000
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.
Posted by Ralph Schindler (ralph) on 2012-10-08T20:14:36.000+0000
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
Have you found an issue?
See the Overview section for more details.