/** * Clean logs * * @return $this */ public function logClean() { if (!$this->_scopeConfig->isSetFlag(self::XML_PATH_LOG_CLEAN_ENABLED, \Magento\Store\Model\ScopeInterface::SCOPE_STORE)) { return $this; } $this->_errors = array(); try { $this->_log->clean(); } catch (\Exception $e) { $this->_errors[] = $e->getMessage(); $this->_errors[] = $e->getTrace(); } $this->_sendLogCleanEmail(); return $this; }
public function testClean() { $this->assertSame($this->log, $this->log->clean()); }