code: public function clear($flags = self::CLEAR_LOG)
      {
          // "use" our function params so things don't complain
          array($flags);
          $args = \func_get_args();
          $meta = $this->internal->getMetaVals(
              $args,
              array('channel' => $this->cfg['channel']),
              array('flags' => self::CLEAR_LOG),
              array('flags' => 'bitmask')
          );
          $event = $this->methodClear->onLog(new Event($this, array(
              'method' => __FUNCTION__,
              'args' => array(),
              'meta' => $meta,
          )));
          // even if cleared from within summary, let's log this in primary log
          $this->setLogDest('log');
          $collect = $this->cfg['collect'];
          $this->cfg['collect'] = true;
          if ($event['log']) {
              $this->appendLog(
                  $event['method'],
                  $event['args'],
                  $event['meta']
              );
          } elseif ($event['publish']) {
              /*
                  Publish the debug.log event (regardless of cfg.collect)
                  don't actually log
              */
              $this->internal->publishBubbleEvent('debug.log', $event);
          }
          $this->cfg['collect'] = $collect;
          $this->setLogDest('auto');
      }
docs: Clear the log
  
  This method executes even if `collect` is false
  
  @param integer $flags (self::CLEAR_LOG) specify what to clear (bitmask)
  CLEAR_ALERTS
  CLEAR_LOG (excluding warn & error)
  CLEAR_LOG_ERRORS
  CLEAR_SUMMARY (excluding warn & error)
  CLEAR_SUMMARY_ERRORS
  CLEAR_ALL
  CLEAR_SILENT (don't add log entry)
  
  @return void