ZF-5741: Create the log file only if there is something to log
When you initialize the logger in the bootstrap file, for every request a log file will automatically be created if it doesn't exist, even when you do not plan to log.
I suggest to create the logfile only the first time something has to be logged.
Example: $logger = new Zend_Log(); $writer = new Zend_Log_Writer_Stream($path . "logfile-" . date("Ymd-H") . ".log"); $logger->addWriter($writer); I create a logfile per hour. If there is nothing to log for a specific day, this will create 24 empty logfiles, because the logfile is created in the constructor of Zend_Log_Writer_Stream.