Exemplo n.º 1
0
 /**
  * Close the writer
  *
  * @return void
  */
 public function shutdown()
 {
     while (!$this->buffer->isEmpty()) {
         $this->buffer->dequeue();
     }
     $this->writer->shutdown();
 }
Exemplo n.º 2
0
 /**
  * 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();
     }
 }