/** * Close the writer * * @return void */ public function shutdown() { while (!$this->buffer->isEmpty()) { $this->buffer->dequeue(); } $this->writer->shutdown(); }
/** * If the log messages have been stored in the internal buffer, just send them * to table storage. */ public function shutdown() { parent::shutdown(); if ($this->_bufferMessages) { $this->_tableStorageConnection->startBatch(); foreach ($this->_messageBuffer as $logEntity) { $this->_tableStorageConnection->insertEntity($this->_tableName, $logEntity); } $this->_tableStorageConnection->commit(); } }