public static function onError($number, $message, $file, $line) { if (error_reporting() === 0) { return; } $msg = $message . ' at ' . $file . '#' . $line; self::$logger->error(self::removePassword($msg), array('app' => 'PHP')); }
/** * @param JobList $jobList * @param \OC\Log $logger */ public function execute($jobList, $logger = null) { $jobList->setLastRun($this); try { $this->run($this->argument); } catch (\Exception $e) { if ($logger) { $logger->error('Error while running background job: ' . $e->getMessage()); } $jobList->remove($this, $this->argument); } }