If you only log from Controller (or something like that) you can also create an ActionHelper, which will lazy-load your Log-object. Maybe You are interested to write an Adapter, which will do that instead.

debussy007 schrieb:
Hi,

I have a plugin called at every request, which is choosing the right file
for the logging.
I create a log for every hour.

The problem is that if there is a new request, even if there is nothing to
log, a new file is created. Consequent: I have tons of logging files for each day each hour.

$path = [...]
$logger = new Zend_Log();
$writer = new Zend_Log_Writer_Stream($path . "logfile-" . date("Ymd-H") .
".log");
$logger->addWriter($writer);

Can anyone help please ?

Thank you !

Reply via email to