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

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 :


resources.log.AppLog.writerParams.formatterName = "Simple"

Be careful to use the info parameter with this formatter. If you have a log without extra, your file write without interpretation %info%.