code: private function clearErrors($flags)
      {
          $clearErrors = $flags & Debug::CLEAR_LOG_ERRORS || $flags & Debug::CLEAR_SUMMARY_ERRORS;
          if (!$clearErrors) {
              return;
          }
          $errorsNotCleared = array();
          /*
              Clear Log Errors
          */
          $errorsNotCleared = $this->clearErrorsHelper(
              $this->data['log'],
              $flags & Debug::CLEAR_LOG_ERRORS
          );
          /*
              Clear Summary Errors
          */
          foreach (\array_keys($this->data['logSummary']) as $priority) {
              $errorsNotCleared = \array_merge($this->clearErrorsHelper(
                  $this->data['logSummary'][$priority],
                  $flags & Debug::CLEAR_SUMMARY_ERRORS
              ));
          }
          $errorsNotCleared = \array_unique($errorsNotCleared);
          $errors = $this->debug->errorHandler->get('errors');
          foreach ($errors as $error) {
              if (!\in_array($error['hash'], $errorsNotCleared)) {
                  $error['inConsole'] = false;
              }
          }
      }
docs: Remove error & warn from summary & log
  
  @param integer $flags flags passed to clear()
  
  @return void