当前位置: 首页>>代码示例>>PHP>>正文


PHP Log::Error方法代码示例

本文整理汇总了PHP中Log::Error方法的典型用法代码示例。如果您正苦于以下问题:PHP Log::Error方法的具体用法?PHP Log::Error怎么用?PHP Log::Error使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Log的用法示例。


在下文中一共展示了Log::Error方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: Connect

 public function Connect()
 {
     $connected = false;
     $attempts = 0;
     $hosts = $this->options->Controllers();
     $options = $this->options->AdLdapOptions();
     while (!$connected && $attempts < count($hosts)) {
         try {
             $host = $hosts[$attempts];
             Log::Debug('ActiveDirectory - Trying to connect to host %s', $host);
             $options['domain_controllers'] = array($host);
             $attempts++;
             $this->ldap = new adLdap($options);
             $connected = true;
             if ($connected) {
                 Log::Debug('ActiveDirectory - Connection succeeded to host %s', $host);
             } else {
                 Log::Debug('ActiveDirectory - Connection failed to host %s. Reason %s', $host, $this->ldap->getLastError());
             }
         } catch (adLDAPException $ex) {
             Log::Error($ex);
             throw $ex;
         }
     }
     return $connected;
 }
开发者ID:Trideon,项目名称:gigolo,代码行数:26,代码来源:AdLdapWrapper.php

示例2: Handle

 public static function Handle($exception)
 {
     Log::Error('Uncaught exception: %s', $exception);
     if (isset(self::$handler)) {
         self::$handler->HandleException($exception);
     }
 }
开发者ID:Trideon,项目名称:gigolo,代码行数:7,代码来源:ExceptionHandler.php

示例3: TryPageLoad

 private function TryPageLoad($currentUser)
 {
     $fileId = $this->page->GetFileId();
     $referenceNumber = $this->page->GetReferenceNumber();
     Log::Debug('Trying to load reservation attachment. FileId: %s, ReferenceNumber %s', $fileId, $referenceNumber);
     $attachment = $this->reservationRepository->LoadReservationAttachment($fileId);
     if ($attachment == null) {
         Log::Error('Error loading resource attachment, attachment not found');
         return false;
     }
     $reservation = $this->reservationRepository->LoadByReferenceNumber($referenceNumber);
     if ($reservation == null) {
         Log::Error('Error loading resource attachment, reservation not found');
         return false;
     }
     if ($reservation->SeriesId() != $attachment->SeriesId()) {
         Log::Error('Error loading resource attachment, attachment not associated with reservation');
         return false;
     }
     if (!$this->permissionService->CanAccessResource(new ReservationResource($reservation->ResourceId()), $currentUser)) {
         Log::Error('Error loading resource attachment, insufficient permissions');
         return false;
     }
     return $attachment;
 }
开发者ID:hugutux,项目名称:booked,代码行数:25,代码来源:ReservationAttachmentPresenter.php

示例4: UpdateTheme

 public function UpdateTheme()
 {
     $logoFile = $this->page->GetLogoFile();
     $cssFile = $this->page->GetCssFile();
     if ($logoFile != null) {
         Log::Debug('Replacing logo with ' . $logoFile->OriginalName());
         $targets = glob(ROOT_DIR . 'Web/img/custom-logo.*');
         foreach ($targets as $target) {
             $removed = unlink($target);
             if (!$removed) {
                 Log::Error('Could not remove existing logo. Ensure %s is writable.', $target);
             }
         }
         $target = ROOT_DIR . 'Web/img/custom-logo.' . $logoFile->Extension();
         $copied = copy($logoFile->TemporaryName(), $target);
         if (!$copied) {
             Log::Error('Could not replace logo with %s. Ensure %s is writable.', $logoFile->OriginalName(), $target);
         }
     }
     if ($cssFile != null) {
         Log::Debug('Replacing css file with ' . $cssFile->OriginalName());
         $target = ROOT_DIR . 'Web/css/custom-style.css';
         $copied = copy($cssFile->TemporaryName(), $target);
         if (!$copied) {
             Log::Error('Could not replace css with %s. Ensure %s is writable.', $cssFile->OriginalName(), $target);
         }
     }
 }
开发者ID:hugutux,项目名称:booked,代码行数:28,代码来源:ManageThemePresenter.php

示例5: RemoveFile

 /**
  * @param $fullPath string
  * @return void
  */
 public function RemoveFile($fullPath)
 {
     Log::Debug('Deleting file: %s', $fullPath);
     if (unlink($fullPath) === false) {
         Log::Error('Could not delete file: %s', $fullPath);
     }
 }
开发者ID:Trideon,项目名称:gigolo,代码行数:11,代码来源:FileSystem.php

示例6: ProcessAction

 public function ProcessAction()
 {
     try {
         parent::ProcessAction();
     } catch (Exception $ex) {
         Log::Error('Error getting report: %s', $ex);
         $this->page->DisplayError();
     }
 }
开发者ID:Trideon,项目名称:gigolo,代码行数:9,代码来源:SavedReportsPresenter.php

示例7: EnsureCommandLine

 public static function EnsureCommandLine()
 {
     try {
         if (array_key_exists('REQUEST_METHOD', $_SERVER)) {
             die('This can only be accessed via the command line');
         }
     } catch (Exception $ex) {
         Log::Error('Error in JobCop->EnsureCommandLine: %s', $ex);
     }
 }
开发者ID:ksdtech,项目名称:booked,代码行数:10,代码来源:JobCop.php

示例8: Validate

 public function Validate($username, $password)
 {
     try {
         phpCAS::forceAuthentication();
     } catch (Exception $ex) {
         Log::Error('CAS exception: %s', $ex);
         return false;
     }
     return true;
 }
开发者ID:hugutux,项目名称:booked,代码行数:10,代码来源:CAS.php

示例9: ProcessPageLoad

 public function ProcessPageLoad()
 {
     $this->Set('EnableCaptcha', Configuration::Instance()->GetKey(ConfigKeys::REGISTRATION_ENABLE_CAPTCHA, new BooleanConverter()));
     try {
         $this->_presenter->PageLoad();
         $this->Display('register.tpl');
     } catch (Exception $ex) {
         $this->Set('PageLoadException', true);
         Log::Error('Error loading registration page %s', $ex);
     }
 }
开发者ID:ajeshgeorge22,项目名称:booked,代码行数:11,代码来源:RegistrationPage.php

示例10: Notify

 /**
  * @param $reservationSeries ReservationSeries|ExistingReservationSeries
  * @return void
  */
 public function Notify($reservationSeries)
 {
     $referenceNumber = $reservationSeries->CurrentInstance()->ReferenceNumber();
     foreach ($this->notifications as $notification) {
         try {
             Log::Debug("Calling notify on %s for reservation %s", get_class($notification), $referenceNumber);
             $notification->Notify($reservationSeries);
         } catch (Exception $ex) {
             Log::Error("Error sending notification of type %s for reservation %s. Exception: %s", get_class($notification), $referenceNumber, $ex);
         }
     }
 }
开发者ID:Trideon,项目名称:gigolo,代码行数:16,代码来源:IReservationNotificationService.php

示例11: __call

 public function __call($func, $args)
 {
     if ($this->redis_ && method_exists($this->redis_, $func)) {
         $r = new RunTimeUtil();
         $ret = call_user_func_array(array($this->redis_, $func), $args);
         $time = $r->spent();
         Log::Info('cache', "#method:{$func}#args:" . json_encode($args) . "#ret:" . json_encode($ret) . "#runtime:{$time}");
         return $ret;
     } else {
         Log::Error('cache', "#method{$func}#args" . json_encode($args) . "#message:no funcs or client is null");
         return null;
     }
 }
开发者ID:maigoxin,项目名称:easylib,代码行数:13,代码来源:RedisClient.php

示例12: __call

 public final function __call($func, $args)
 {
     if ($this->_medoo && method_exists($this->_medoo, $func)) {
         $r = new RunTimeUtil();
         $ret = call_user_func_array(array($this->_medoo, $func), $args);
         $time = $r->spent();
         $logs = $this->_medoo->log();
         Log::Info('db', "#method:{$func}#sql:" . end($logs) . "#ret:" . json_encode($ret) . "#runtime:{$time}");
         return $ret;
     } else {
         Log::Error('db', "#method{$func}#args" . json_encode($args) . "#message:no funcs or client is null");
         return null;
     }
 }
开发者ID:maigoxin,项目名称:easylib,代码行数:14,代码来源:BaseDB.php

示例13: RemoveLogo

 public function RemoveLogo()
 {
     try {
         $targets = glob(ROOT_DIR . 'Web/img/custom-logo.*');
         foreach ($targets as $target) {
             $removed = unlink($target);
             if (!$removed) {
                 Log::Error('Could not remove existing logo. Ensure %s is writable.', $target);
             }
         }
     } catch (Exception $ex) {
         Log::Error('Could not remove logos. %s', $ex);
     }
 }
开发者ID:utn-frm-si,项目名称:booked,代码行数:14,代码来源:ManageThemePresenter.php

示例14: Validate

 public function Validate($username, $password)
 {
     try {
         if ($_GET["doCAS"] == 1) {
             phpCAS::forceAuthentication();
         } else {
             return parent::Validate($username, $password);
         }
     } catch (Exception $ex) {
         Log::Error('CAS exception: %s', $ex);
         return false;
     }
     return true;
 }
开发者ID:AgrosupDijon-Eduter,项目名称:booked-CAS-authentication,代码行数:14,代码来源:CnertaCAS.php

示例15: Flush

 public function Flush()
 {
     try {
         $dirName = $this->GetDirectory();
         $cacheDir = opendir($dirName);
         while (false !== ($file = readdir($cacheDir))) {
             if ($file != "." && $file != "..") {
                 unlink($dirName . $file);
             }
         }
         closedir($cacheDir);
     } catch (Exception $ex) {
         Log::Error('Could not flush template cache directory: %s', $ex);
     }
 }
开发者ID:hugutux,项目名称:booked,代码行数:15,代码来源:TemplateCacheDirectory.php


注:本文中的Log::Error方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。