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


PHP Log::warning方法代码示例

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


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

示例1: parse

 public function parse()
 {
     if (is_null($this->rawData) === true || count(explode("\n", $this->rawData)) < 3) {
         $whoisServer = isset($this->rir->whois_server) ? $this->rir->whois_server : 'NO WHOIS SERVER';
         Log::warning("No raw whois data returned for: " . $this->input . "(" . $whoisServer . ")");
         return null;
     }
     // Check if there is the unallocated words in whois returned data
     if (strpos($this->rawData, 'Unallocated and unassigned') !== false) {
         Log::warning("Unassigned/Unallocated prefix on: " . $this->input . "(" . $this->rir->whois_server . ")");
         return null;
     }
     // Check if there the usual issues with the 'high volume' error
     if (strpos($this->rawData, 'Unable to service request due to high volume') !== false) {
         Log::warning("High volume whois server error on: " . $this->input . "(" . $this->rir->whois_server . ")");
         return null;
     }
     $functionName = strtolower($this->rir->name) . "Execute";
     try {
         $results = $this->{$functionName}();
     } catch (\Exception $e) {
         Log::warning(["Something went wrong on: " . $this->input . "(" . $this->rir->whois_server . ")"], [$e->getMessage()]);
         return null;
     }
     return $results;
 }
开发者ID:BGPView,项目名称:Backend-API,代码行数:26,代码来源:Whois.php

示例2: send

 /**
  * {@inheritdoc}
  */
 public function send(Swift_Mime_Message $message, &$failedRecipients = null)
 {
     try {
         $to = implode(', ', array_keys((array) $message->getTo()));
         $cc = implode(', ', array_keys((array) $message->getCc()));
         $bcc = implode(', ', array_keys((array) $message->getBcc()));
         $replyto = '';
         foreach ((array) $message->getReplyTo() as $address => $name) {
             $replyto = $address;
             break;
         }
         $mail_options = ["sender" => "admin@{$this->app->getGaeAppId()}.appspotmail.com", "to" => $to, "subject" => $message->getSubject(), "htmlBody" => $message->getBody()];
         if ($cc !== '') {
             $mail_options['cc'] = $cc;
         }
         if ($bcc !== '') {
             $mail_options['bcc'] = $bcc;
         }
         if ($replyto !== '') {
             $mail_options['replyto'] = $replyto;
         }
         $attachments = $this->getAttachmentsArray($message);
         if (count($attachments) > 0) {
             $mail_options['attachments'] = $attachments;
         }
         $gae_message = new GAEMessage($mail_options);
         $gae_message->send();
     } catch (InvalidArgumentException $ex) {
         Log::warning("Exception sending mail: " . $ex);
     }
 }
开发者ID:wasay,项目名称:GaeSupportL5,代码行数:34,代码来源:GaeTransport.php

示例3: getUserFromCookie

 public function getUserFromCookie($cookie)
 {
     $tokenObject = new Token($cookie);
     // Get a payload info from the token
     try {
         $payload = JWTAuth::decode($tokenObject);
     } catch (TokenExpiredException $e) {
         $message = 'Token in cookie was expired';
         throw new TokenInCookieExpiredException($message, null, $e);
     }
     // Get user by the payload info
     try {
         $user = $this->userUpdater->updateBaseInfo($payload);
     } catch (RepositoryException $e) {
         throw new AuthException($e->getMessage(), null, $e);
     }
     // Attempt to update his profile by API or just log the error
     try {
         $user = $this->userUpdater->updateAdditionalInfo($cookie, $user);
     } catch (UpdatingFailureException $e) {
         Log::warning('An additional user information was\'nt updated. ' . $e->getMessage());
     }
     // Login
     Auth::login($user, true);
     // Return an actual user model if login passes
     if (Auth::check()) {
         return $this->userRepository->findWithRelations(Auth::id(), ['localRole']);
     } else {
         throw new AuthException('Login error. User is not authorized.');
     }
 }
开发者ID:B1naryStudio,项目名称:asciit,代码行数:31,代码来源:AuthService.php

示例4: getOrder

 /**
  * Listens for and stores PayPal IPN requests.
  *
  * @throws InvalidIpnException
  *
  * @return IpnOrder
  */
 public function getOrder()
 {
     $ipnMessage = null;
     $listenerBuilder = new ListenerBuilder();
     if ($this->getEnvironment() == 'sandbox') {
         $listenerBuilder->useSandbox();
         // use PayPal sandbox
     }
     $listener = $listenerBuilder->build();
     $listener->onVerified(function (MessageVerifiedEvent $event) {
         $ipnMessage = $event->getMessage();
         Log::info('IPN message verified - ' . $ipnMessage);
         $this->order = $this->store($ipnMessage);
     });
     $listener->onInvalid(function (MessageInvalidEvent $event) {
         $report = $event->getMessage();
         Log::warning('Paypal returned invalid for ' . $report);
     });
     $listener->onVerificationFailure(function (MessageVerificationFailureEvent $event) {
         $error = $event->getError();
         // Something bad happend when trying to communicate with PayPal!
         Log::error('Paypal verification error - ' . $error);
     });
     $listener->listen();
     return $this->order;
 }
开发者ID:ryantology,项目名称:paypal-ipn-laravel,代码行数:33,代码来源:PayPalIpn.php

示例5: detectAllLocation

 public static function detectAllLocation()
 {
     $views = View::all();
     foreach ($views as $view) {
         if ($view->location != "") {
             continue;
         }
         $ip = $view->ip;
         $client = new Client(['base_uri' => 'http://ip.taobao.com', 'timeout' => 5.0]);
         try {
             $response = $client->request('GET', '/service/getIpInfo.php', ['query' => "ip={$ip}"]);
             $body = json_decode($response->getBody());
             if ($body->code == 0) {
                 $country = $body->data->country;
                 $area = $body->data->area;
                 $region = $body->data->region;
                 $city = $body->data->city;
                 $isp = $body->data->isp;
                 $location = "{$country}-{$area}-{$region}-{$city}-{$isp}";
             } else {
                 $location = "获取失败";
             }
             $view->location = $location;
         } catch (\Exception $e) {
             Log::warning($e->getMessage());
         }
         $view->save();
     }
 }
开发者ID:roslairy,项目名称:roslairy,代码行数:29,代码来源:IpLocation.php

示例6: report

 /**
  * Report or log an exception.
  *
  * This is a great spot to send exceptions to Sentry, Bugsnag, etc.
  *
  * @param  \Exception  $e
  * @return void
  */
 public function report(Exception $e)
 {
     if ($e instanceof ParserException) {
         Log::warning('Hiba az url betöltésekor');
         return;
     }
     return parent::report($e);
 }
开发者ID:enhive,项目名称:vev,代码行数:16,代码来源:Handler.php

示例7: index

 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     Log::info('infoメッセージ');
     Log::debug('debugメッセージ');
     Log::warning('warningメッセージ');
     Log::error('errorメッセージ');
     return view('welcome');
 }
开发者ID:picolit,项目名称:bbs,代码行数:13,代码来源:WelcomeController.php

示例8: completed

 public function completed()
 {
     if (count($this->answered()) == count($this->answers)) {
         $this->completed = true;
     } else {
         Log::warning('Попытка завершить тест при не всех отвеченных вопросах');
     }
     return $this;
 }
开发者ID:DJZT,项目名称:tezter,代码行数:9,代码来源:Test.php

示例9: getPermission

 /**
  * Returns an empty error in case of non-existend database (i.e. when working with a newly deployed system).
  *
  * @return array|\Illuminate\Database\Eloquent\Collection|static[]
  */
 protected function getPermission()
 {
     try {
         return Permission::with('roles')->get();
     } catch (PDOException $e) {
         Log::warning('Permission table could not be found when trying to load permissions in AuthServiceProvider');
         return [];
     }
 }
开发者ID:vainproject,项目名称:vain-user,代码行数:14,代码来源:AuthServiceProvider.php

示例10: checkFail

 public function checkFail($check_id, $note = null)
 {
     try {
         $this->guzzle_client->get($this->consul_url . '/v1/agent/check/fail/' . urlencode($check_id), ['query' => ['note' => $note]]);
         return true;
     } catch (Exception $e) {
         Log::warning("failed to update check failure: " . $check_id);
         return false;
     }
 }
开发者ID:tokenly,项目名称:consul-health-daemon,代码行数:10,代码来源:ConsulClient.php

示例11: getGametype

 /**
  * @param $id
  * @return string
  */
 public static function getGametype($id)
 {
     $id = intval($id);
     if (isset(self::$gametype_ids[$id])) {
         return self::$gametype_ids[$id];
     } else {
         Log::warning('Unknown gametype id ' . $id);
         return 'Unknown';
     }
 }
开发者ID:GMSteuart,项目名称:PandaLove,代码行数:14,代码来源:Gametype.php

示例12: teamIdToString

 /**
  * @param $id
  * @return string
  */
 public static function teamIdToString($id)
 {
     $id = intval($id);
     if (isset(self::$team_id_to_string[$id])) {
         return self::$team_id_to_string[$id];
     } else {
         Log::warning('Team ID: ' . $id . ' is unknown.');
         return 'Unknown';
     }
 }
开发者ID:GMSteuart,项目名称:PandaLove,代码行数:14,代码来源:Team.php

示例13: insertValue

 public function insertValue($value)
 {
     $now = Carbon::now();
     try {
         DB::table('chart_values')->insert(['chart_id' => $this->id, 'timestamp' => $now, 'value' => $value]);
     } catch (Exception $error) {
         Log::warning($error);
         return false;
     }
     return true;
 }
开发者ID:birgirob,项目名称:TiSDaV,代码行数:11,代码来源:Chart.php

示例14: write

 /**
  * 写入一行数据到目标资源
  *
  * @param $row
  * @return mixed
  */
 public function write($row)
 {
     // 换行处理
     $ret = [];
     foreach ($row as $item) {
         $ret[] = str_replace("\n", "\r", $item);
     }
     $ret = fputcsv($this->fd, $ret, "\t");
     if (false === $ret) {
         Log::warning("数据行写入csv发生错误,该行数据未能成功写入:" . json_encode($ret));
     }
 }
开发者ID:matrixstyle,项目名称:etl,代码行数:18,代码来源:TsvDestination.php

示例15: setBodyClass

 public function setBodyClass(Request $request)
 {
     //$inputs = serialize($request->all());
     //Log::info('Ajax request fired to setToggleMenu method: '.$inputs);
     if ($request->has('styling')) {
         //Log::info('Found hidemenu with value of: '.$request->input('hidemenu'));
         session(['body-class' => $request->input('styling')]);
         //Log::info('Session value is now: '.Session::get('hidden-menu'));
     } else {
         Log::warning('setBodyClass called with no styling input');
     }
 }
开发者ID:SlipperyPenguine,项目名称:tracker,代码行数:12,代码来源:ApiController.php


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