示例#1
0
文件: Stream.php 项目: erebot/plop
 /**
  * Create a new instance of this handler.
  *
  * \param resource $stream
  *      (optional) The stream where log messages
  *      will be written. Defaults to \a STDERR.
  */
 public function __construct($stream = null)
 {
     if ($stream === null) {
         if (self::$stderr === null) {
             self::$stderr = fopen('php://stderr', 'w');
         }
         $stream = self::$stderr;
     }
     parent::__construct();
     $this->stream = $stream;
 }
示例#2
0
文件: Socket.php 项目: erebot/plop
 public function handleError(\Plop\RecordInterface $record, \Exception $exception)
 {
     if ($this->closeOnError) {
         $this->close();
     }
     return parent::handleError($record, $exception);
 }
示例#3
0
 public function formatStub(\Plop\RecordInterface $record)
 {
     return parent::format($record);
 }