original_string: protected function processLogs($logs) 
      {
          $logCollection = \Yii::app()
              ->{$this->serviceName}
              ->getCollection($this->collectionName);
          
          foreach ($logs as $log) {
              
              // time
              $logCollection
                  ->createDocument(array(
                      'level'         => $log[1],
                      'category'      => $log[2],
                      'logtime'       => $this->_timeToMongoDate($log[3]),
                      'message'       => $log[0],
                      'requestUri'    => isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : null,
                      'userAgent'     => isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : null,
                  ))
                  ->save();
          }
      }
code: protected function processLogs($logs) 
      {
          $logCollection = \Yii::app()
              ->{$this->serviceName}
              ->getCollection($this->collectionName);
          
          foreach ($logs as $log) {
              
              // time
              $logCollection
                  ->createDocument(array(
                      'level'         => $log[1],
                      'category'      => $log[2],
                      'logtime'       => $this->_timeToMongoDate($log[3]),
                      'message'       => $log[0],
                      'requestUri'    => isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : null,
                      'userAgent'     => isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : null,
                  ))
                  ->save();
          }
      }
code_tokens: protected function processLogs ( $ logs ) { $ logCollection = \ Yii :: app ( ) -> { $ this -> serviceName } -> getCollection ( $ this -> collectionName ) ; foreach ( $ logs as $ log ) { // time $ logCollection -> createDocument ( array ( 'level' => $ log [ 1 ] , 'category' => $ log [ 2 ] , 'logtime' => $ this -> _timeToMongoDate ( $ log [ 3 ] ) , 'message' => $ log [ 0 ] , 'requestUri' => isset ( $ _SERVER [ 'REQUEST_URI' ] ) ? $ _SERVER [ 'REQUEST_URI' ] : null , 'userAgent' => isset ( $ _SERVER [ 'HTTP_USER_AGENT' ] ) ? $ _SERVER [ 'HTTP_USER_AGENT' ] : null , ) ) -> save ( ) ; } }
docstring: Write log messages
  @param array $logs list of messages
docstring_tokens: Write log messages