log in destructors?

From: Date: Tue, 09 Apr 2002 09:33:49 +0000
Subject: log in destructors?
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-1114@lists.php.net to get a copy of this message
can Log object be used in pear destructors? it looks like it can`t: require_once 'PEAR.php'; require_once 'Log.php'; class Testus extends Pear { function Testus() { $this->Pear(); echo 'constructor<br>'; $this->log = Log::factory('file', 'log.txt', 'identity text'); $this->log->log('start ok'); } function _Testus() { echo 'destructor<br>'; $this->log->log('stop ok'); } var $log; } $t=new Testus(); -- i always get one line in log - the one with 'start ok'. i`ve checked Log_file code, everything looks like the second line is being written to (fwrite returns >0), but i can`t find it. is it a problem with my platform, pear or php shutdown? w2k pro, php 4.1.1 rash ps. just got to work so expect even more reports on Log class ;)

« previous php.pear.general (#1114) next »