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


PHP Log::error方法代码示例

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


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

示例1: getArticleAttribute

 /**
  * @return string
  */
 protected function getArticleAttribute()
 {
     $path = $this->path;
     $file = $this->file;
     try {
         return app('files')->get("{$path}/{$file}");
     } catch (\Exception $e) {
         \Log::error($e->getMessage());
     }
     return '';
 }
开发者ID:kishanterry,项目名称:emdlog,代码行数:14,代码来源:Article.php

示例2: getTestCatIdByName

 /**
  * Given the test category name we return the test category ID
  *
  * @param $testcategory - the name of the test category
  */
 public static function getTestCatIdByName($testCategory)
 {
     try {
         $testCatId = TestCategory::where('name', 'like', $testCategory)->firstOrFail();
         return $testCatId->id;
     } catch (ModelNotFoundException $e) {
         Log::error("The test category ` {$testCategory} ` does not exist:  " . $e->getMessage());
         //TODO: send email?
         return null;
     }
 }
开发者ID:echiteri,项目名称:iBLIS,代码行数:16,代码来源:TestCategory.php

示例3: idByName

 /**
  * Return field ID given the name
  * @param $name the name of the field
  */
 public static function idByName($name = NULL)
 {
     if ($name) {
         try {
             $field = Field::where('field_name', $name)->orderBy('field_name', 'asc')->firstOrFail();
             return $field->id;
         } catch (ModelNotFoundException $e) {
             Log::error("The field ` {$name} ` does not exist:  " . $e->getMessage());
             //TODO: send email?
             return null;
         }
     } else {
         return null;
     }
 }
开发者ID:echiteri,项目名称:iBLIS,代码行数:19,代码来源:Field.php

示例4: beforeSave

 /**
  *	beforeSave.
  *
  *	Validates before saving.  Returns whether the Group can be saved.
  *
  *	@param array $options
  *
  *	@return bool
  */
 private function beforeSave(array $options = array())
 {
     if (!$this->validate()) {
         Log::error("Unable to validate group: ");
         Log::error($this->getErrors()->toArray());
         Log::error($this->attributes);
         return false;
     }
     return true;
 }
开发者ID:johnfelipe,项目名称:madison,代码行数:19,代码来源:Group.php

示例5: updateInventory

 public function updateInventory($flightID, $flightWebsiteID, $event, $overReport = false)
 {
     $trackInventory = $overReport ? new TrackingOverInventory() : new TrackingInventory();
     try {
         $trackInventory->incTotalAdZoneInventory($flightID, $flightWebsiteID, $event);
         $trackInventory = $overReport ? new TrackingOverInventory() : new TrackingInventory();
         $trackInventory->incTotalInventory($flightID, $event);
         return true;
     } catch (Exception $exception) {
         Log::error($exception);
         throw $exception;
         return false;
     }
 }
开发者ID:huycao,项目名称:yodelivery,代码行数:14,代码来源:Tracking.php

示例6: saveInstrument

 /**
  * Save instrument
  *
  * @param String machineCode, String ip, optional String hostname
  * @return String success/failure message
  */
 public static function saveInstrument($code, $ip, $hostname = "")
 {
     $plugin = Instrument::getInstalledPlugins(true);
     $className = "";
     // Get the class name of the user selected plugin
     foreach ($plugin as $key => $plug) {
         // If the instrument_code matches that of the select box, WE HAVE A MATCH
         if ($key == $code) {
             $className = $plug['class'];
             break;
         }
     }
     if (class_exists($className)) {
         $instrument = new $className($ip);
         $deviceInfo = $instrument->getEquipmentInfo();
         $newInstrument = new Instrument();
         $newInstrument->name = $deviceInfo['name'];
         $newInstrument->description = $deviceInfo['description'];
         $newInstrument->driver_name = $className;
         $newInstrument->ip = $ip;
         $newInstrument->hostname = Input::get('hostname');
         try {
             $newInstrument->save();
             $newInstrument->setTestTypes($deviceInfo['testTypes']);
             return trans('messages.success-creating-instrument');
         } catch (QueryException $e) {
             Log::error($e);
         }
     }
     return trans('messages.failure-creating-instrument');
 }
开发者ID:echiteri,项目名称:iBLIS,代码行数:37,代码来源:Instrument.php

示例7: getMeasureIdByName

 /**
  * Given the measure name we return the measure ID
  *
  * @param $measureName the name of the measure
  */
 public static function getMeasureIdByName($measureName)
 {
     try {
         $measure = Measure::where('name', 'like', $measureName)->firstOrFail();
         return $measure->id;
     } catch (ModelNotFoundException $e) {
         Log::error("The measure ` {$measureName} ` does not exist:  " . $e->getMessage());
         //TODO: send email?
         return null;
     }
 }
开发者ID:echiteri,项目名称:iBLIS,代码行数:16,代码来源:Measure.php

示例8: getTestTypeIdByTestName

 /**
  * Given the test name we return the test type ID
  *
  * @param $testname the name of the test
  */
 public static function getTestTypeIdByTestName($testName)
 {
     try {
         $testName = trim($testName);
         $testTypeId = TestType::where('name', 'like', $testName)->orderBy('name')->firstOrFail();
         return $testTypeId->id;
     } catch (ModelNotFoundException $e) {
         \Log::error("The test type ` {$testName} ` does not exist:  " . $e->getMessage());
         //TODO: send email?
         return null;
     }
 }
开发者ID:echiteri,项目名称:iBLIS,代码行数:17,代码来源:TestType.php


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