Ejemplo n.º 1
0
 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'));
 }
Ejemplo n.º 2
0
 /**
  * @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);
     }
 }