2008年9月23日星期二

Re: [fw-core] Zend_Log factory() proposition

-- Martin Roest - Ibuildings <martin@ibuildings.nl> wrote
(on Tuesday, 23 September 2008, 05:14 PM +0200):
> I'd like to do a proposition for a factory method in the Zend_Log that allows
> easy creation and configuration of the Zend_Log object.
>
> For example you have more than one logger and you want to be able to easily
> enable/disable the writers separately. Often we use multiple environments like
> staging, integration and production. ie. I want to write to a log file on
> production but disable the firePHP logging.
>
> Now we have something like this in our config.ini file:
>
> debug.log.file.class = "Zend_Log_Writer_Stream"
> debug.log.file.config.uri = "/<path>/<to>/application.log"
> debug.log.file.enabled = true
> debug.log.firebug.class = "Zend_Log_Writer_Firebug"
> debug.log.firebug.params = ""
> debug.log.firebug.enabled = false
>
> From that we create a Zend_Config object and passes it to a factory method that
> will create the Zend_Log object.
>
> If find myself doing this for every project and it would be nice if we could
> incorporate it in the Zend_Log itself. To make it work we need to change a
> little bit in the stream writer but it can be kept backwards compatible.
>
> Its kinda similar to what is used with Zend_db.
>
> I'd happy to build it and provide patches.
>
> Let me know what you guys think.

Martin -- as we discussed at ZendCon, this sounds good.

To proceed, first, make sure you have signed up for an account on the
wiki, and that you have permissions to create pages; ping me if you
don't, and I'll get you setup.

Then, create a proposal on the wiki:

http://framework.zend.com/wiki/display/ZFPROP/Home

Once all details are complete, reparent it to "Ready for Review" to get
community feedback. After 1 - 2 weeks, and after you've incorporated any
good feedback, reparent it to "Ready for Recommendation", and the
internal team will review and (hopefully) approve.

Thanks in advance for the contribution!

--
Matthew Weier O'Phinney
Software Architect | matthew@zend.com
Zend Framework | http://framework.zend.com/

没有评论: