ZF-11795: Zend_Log_Writer_Stream ignores config params for formatter (formatter class name and params hardcoded in constructor)
Description
Example (config.ini);
resources.log.AppLog.writerName = "Stream"
resources.log.AppLog.writerParams.stream = APPLICATION_PATH "/../logs/app.log"
resources.log.AppLog.writerParams.formatterName = "Zend_Log_Formatter_Simple"
resources.log.AppLog.writerParams.formatterParams.format = "%timestamp% ID: %id% %priorityName% (%priority%): %message%" PHP_EOL "%info%" PHP_EOL
After bootstrap we will get formatter and format values by default but not by config.
Comments
Posted by Benoît Durand (intiilapa) on 2011-10-08T11:03:34.000+0000
A unit test validates the behavior. I think it's more a concern of configuration or documentation: you must use shortname for a *name like formatterName.
Try this :
Be careful to use the info parameter with this formatter. If you have a log without extra, your file write without interpretation %info%.