當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Log::info方法代碼示例

本文整理匯總了PHP中Illuminate\Support\Facades\Log::info方法的典型用法代碼示例。如果您正苦於以下問題:PHP Log::info方法的具體用法?PHP Log::info怎麽用?PHP Log::info使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Illuminate\Support\Facades\Log的用法示例。


在下文中一共展示了Log::info方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: boot

 public function boot()
 {
     if (!($model = $this->getModelClass())) {
         return;
     }
     parent::boot();
     // Flush nested set caches related to the object
     if (Config::get('app.debug')) {
         Log::info('Binding heirarchical caches', ['model' => $model]);
     }
     // Trigger save events after move events
     // Flushing parent caches directly causes an infinite recursion
     $touch = function ($node) {
         if (Config::get('app.debug')) {
             Log::debug('Touching parents to trigger cache flushing.', ['parent' => $node->parent]);
         }
         // Force parent caches to flush
         if ($node->parent) {
             $node->parent->touch();
         }
     };
     $model::moved($touch);
     // Flush caches related to the ancestors
     $flush = function ($node) {
         $tags = $this->make($node)->getParentTags();
         if (Config::get('app.debug')) {
             Log::debug('Flushing parent caches', ['tags' => $tags]);
         }
         Cache::tags($tags)->flush();
     };
     $model::saved($flush);
     $model::deleted($flush);
 }
開發者ID:C4Tech,項目名稱:laravel-nested-sets,代碼行數:33,代碼來源:Repository.php

示例2: 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

示例3: index

 /**
  * 處理微信調用的請求
  */
 public function index()
 {
     $message = file_get_contents("php://input");
     Log::info($message);
     $message = simplexml_load_string($message, 'SimpleXMLElement', LIBXML_NOCDATA);
     if ($message) {
         $msgType = $message->MsgType;
         $fromUser = $message->FromUserName;
         $content = $message->Content;
         if ($msgType == self::WX_MSG_TYPE_TEXT) {
             //處理用戶文字
             return $this->handleUserMassage($message);
         }
         if ($msgType == self::WX_MSG_TYPE_EVENT) {
             if ($message->Event == self::WX_MSG_EVENT_SUBSCRIBE) {
                 //處理用戶訂閱事件
                 return $this->handleSubscribeEvent($message);
             }
             if ($message->Event == self::WX_MSG_EVENT_CLICK) {
                 if ($message->EventKey == self::WX_MENU_KEY_ABOUT_XY) {
                     //處理用戶點擊關於菜單事件
                     return $this->handleClickAboutMenu($message);
                 }
             }
         }
         \Log::info("msgType = {$msgType}");
     }
     return "";
 }
開發者ID:hachi-zzq,項目名稱:dajiayao,代碼行數:32,代碼來源:WeixinController.php

示例4: store

 /**
  * Store a newly created resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @return \Illuminate\Http\Response
  */
 public function store(Request $request)
 {
     //
     $inputs = $request->all();
     rainsensor::create(['raining' => $inputs['rainSensor']]);
     Log::info($inputs);
 }
開發者ID:sfadi215,項目名稱:Smart,代碼行數:13,代碼來源:RainSensorController.php

示例5: save

 public function save($diskName, $destination, $uploadFile = array())
 {
     $this->init($diskName, $destination, $uploadFile);
     if ($this->checkSameNameFile()) {
         if ($this->checkUploadFileMd5()) {
             return UPLOAD_FILE_EXIST;
         }
         return UPLOAD_FILE_SAME_NAME_DIFFERENT_CONTENT;
     }
     if ($this->checkChunk()) {
         return UPLOAD_CHUNK_FILE_EXIST;
     }
     if (!$this->moveFile()) {
         // Move the upload file to the target directory
         return UPLOAD_CHUNK_FILE_FAILURE;
     }
     // Get all chunks
     $chunkfiles = $this->disk->files($this->chunkFile['targetPath']);
     // check the file upload finished
     if (count($chunkfiles) * $this->chunkFile['fileSize'] >= $this->saveFile['fileSize'] - $this->chunkFile['fileSize'] + 1) {
         if (!$this->createFileFromChunks($chunkfiles)) {
             return UPLOAD_FILE_FAILURE;
         }
         Log::info('-------------------------------------------------------');
         Log::info(__CLASS__ . ': save ' . $this->saveFile['fileRealPath'] . ' successfully!');
         Log::info('-------------------------------------------------------');
         return UPLOAD_FILE_SUCCESS;
     }
     return UPLOAD_CHUNK_FILE_SUCCESS;
 }
開發者ID:shanestevenlei,項目名稱:laravel5-file-uploader,代碼行數:30,代碼來源:FileUploader.php

示例6: boot

 public function boot()
 {
     Event::listen('illuminate.query', function ($query, $params, $time, $conn) {
         Log::info($query);
     });
     $this->app['router']->post('datagridview', '\\mkdesignn\\datagridview\\DataGridViewController@postIndex');
 }
開發者ID:mkdesignn,項目名稱:datagridview,代碼行數:7,代碼來源:MkDatagridviewServiceProvider.php

示例7: runProcess

 private function runProcess($processName)
 {
     // use this code to run a bat file
     $processFilename = $processName . '.bat';
     exec('C:\\xampp\\htdocs\\smart\\process\\' . $processFilename);
     Log::info('Running process: ' . $processName);
 }
開發者ID:sfadi215,項目名稱:Smart,代碼行數:7,代碼來源:Control.php

示例8: boot

 /**
  * Bootstrap any application services.
  *
  * 這裏麵能做很多跟監控有關的事情
  *
  * @return void
  */
 public function boot()
 {
     // 監聽數據庫查詢 打印LOG
     DB::listen(function ($sql, $bindings, $time) {
         Log::info('query db' . $sql . ' and the time is ' . $time);
     });
 }
開發者ID:picexif,項目名稱:tushuo,代碼行數:14,代碼來源:AppServiceProvider.php

示例9: handle

 /**
  * Execute the console command.
  *
  * @return mixed
  */
 public function handle()
 {
     Log::info('Begin the check-cycle-bill command.');
     $now = Carbon::now();
     $cycleBillList = CompanyCycleBill::where('next_date', '>=', $now->format('Y-m-01 00:00:00'))->where('next_date', '<=', $now->format('Y-m-31 23:59:59'))->get();
     foreach ($cycleBillList as $cycleBill) {
         $companyBill = new CompanyBill();
         $item = $cycleBill->item;
         if ($cycleBill->rule = '1m') {
             $item = $item . "(" . $now->month . "月)";
         } elseif ($cycleBill->rule = '3m') {
             $item = $item . "(" . (int) ($now->month / 4 + 1) . "季度)";
         } elseif ($cycleBill->rule = '12m') {
             $item = $item . "(" . $now->year . "年)";
         }
         $companyBill->item = $item;
         $companyBill->user_id = $cycleBill->user_id;
         $companyBill->remarks = $cycleBill->remarks;
         $companyBill->company_id = $cycleBill->company_id;
         $companyBill->operator_id = $cycleBill->operator_id;
         $companyBill->grand_total = $cycleBill->grand_total;
         $companyBill->deadline = $cycleBill->next_date;
         $companyBill->cycle_bill_id = $cycleBill->id;
         $companyBill->save();
         $cycleBill->next_date = $cycleBill->next_date->addMonth(intval($cycleBill->rule));
         $cycleBill->save();
     }
     Log::info('End the check-cycle-bill command.');
 }
開發者ID:n0th1n9,項目名稱:daizhang,代碼行數:34,代碼來源:CheckCycleBill.php

示例10: fire

 /**
  * Execute the console command.
  *
  * @return mixed
  */
 public function fire()
 {
     // Check not 'sync'
     if (Config::get('queue.default') == "sync") {
         Artisan::call('down');
         $this->info("Application maintenance mode enabled.");
         return;
     }
     // Push job onto queue
     Queue::push(function ($job) {
         // Take Application down.
         Artisan::call('down');
         // Add Log message
         Log::info("Application is down, pausing queue while maintenance happens.");
         // Loop, waiting for app to come back up
         while (App::isDownForMaintenance()) {
             echo ".";
             sleep(5);
         }
         // App is back online, kill worker to restart daemon.
         Log::info("Application is up, rebooting queue.");
         Artisan::call('queue:restart');
         $job->delete();
     });
     // Wait until Maintenance Mode enabled.
     while (!App::isDownForMaintenance()) {
         sleep(1);
     }
     $this->info("Application maintenance mode enabled.");
 }
開發者ID:valorin,項目名稱:l4-down-safe,代碼行數:35,代碼來源:DownSafe.php

示例11: handle

 /**
  * Execute the console command.
  *
  * @return mixed
  */
 public function handle()
 {
     Log::info('Iniciando proceso de actualizacion de referencia de ventas');
     $sales = Sales::where('transaction_id', '-1')->get();
     foreach ($sales as $sale) {
         $ventasPorAplicar = DB::table('contabilidad_sales')->select('*')->whereRaw('credit_debit = ? and reference = ? ', ['credit', $sale->reference])->where('transaction_id', '<>', '-1')->groupBy('reference')->get();
         if (count($ventasPorAplicar) > 0) {
             // se encontraron referencias de venta nuevas
             foreach ($ventasPorAplicar as $ventaPorAplicar) {
                 $depositoAplicacionAnterior = DepositoAplicacion::where('venta_id', $sale->id)->get();
                 foreach ($depositoAplicacionAnterior as $depositoAplicacion) {
                     echo $depositoAplicacion->cantidad . ' ' . $depositoAplicacion->deposito_id . ' -- ' . $ventaPorAplicar->ammount . '-- ' . $ventaPorAplicar->ammount_applied . '-------';
                     if ($depositoAplicacion->estatus == 1) {
                         $deposito = new DepositoAplicacion(['deposito_id' => $depositoAplicacion->deposito_id, 'venta_id' => $ventaPorAplicar->id, 'estatus' => $depositoAplicacion->estatus, 'usuario_id' => $depositoAplicacion->usuario_id, 'cantidad' => $depositoAplicacion->cantidad]);
                         $ventaPorAplicar->ammount_applied = $depositoAplicacion->cantidad + ($ventaPorAplicar->ammount - $ventaPorAplicar->ammount_applied);
                     } else {
                         if (abs($depositoAplicacion->cantidad) >= $ventaPorAplicar->ammount - $ventaPorAplicar->ammount_applied) {
                             $ventaPorAplicar->ammount_applied = $depositoAplicacion->ammount;
                             $depositoAplicacion->cantidad = $depositoAplicacion->cantidad - ($ventaPorAplicar->ammount - $ventaPorAplicar->ammount_applied);
                         } else {
                             $ventaPorAplicar->ammount_applied = $ventaPorAplicar->ammount - $ventaPorAplicar->ammount_applied - $depositoAplicacion->cantidad;
                             $depositoAplicacion->cantidad = 0;
                         }
                         $deposito = new DepositoAplicacion(['deposito_id' => $depositoAplicacion->deposito_id, 'venta_id' => $ventaPorAplicar->id, 'estatus' => $depositoAplicacion->estatus, 'usuario_id' => $depositoAplicacion->usuario_id, 'cantidad' => -1 * ($ventaPorAplicar->ammount_applied - $ventaPorAplicar->ammount)]);
                     }
                     $deposito->save();
                     ${$ventaPorAplicar}->update();
                     $depositoAplicacion->delete();
                 }
             }
         }
     }
     Log::info('Finalizando proceso de actualizacion de referencia de ventas');
 }
開發者ID:gitfreengers,項目名稱:larus,代碼行數:39,代碼來源:UpdateSalesCommand.php

示例12: finalizarCarrinho

 /**
  * Finaliza o pedido recebendo a mesa como parametro da requisicao
  * abre o pedido, salva, e salva os itens no pedido.
  * @param Request $request
  */
 public function finalizarCarrinho(Request $request)
 {
     $itens = Cart::content();
     $pedido = new Pedido();
     $pedido->mesa = $request->mesa;
     $pedido->total = Cart::total();
     if (Cart::count() != 0) {
         $pedido->save();
     } else {
         Flash::success("Por favor, adicione algum item no pedido!");
     }
     Log::info($pedido);
     //por enquanto vai ser assim, mas pense numa maneira melhor
     //de retornar o pedido criado.
     $pedidoAtual = Pedido::orderBy('id', 'desc')->first();
     $itensPedidos = array();
     foreach ($itens as $iten) {
         $itemPedido = new ItemPedido();
         $itemPedido->nome = $iten->name;
         $itemPedido->preco = $iten->price;
         $itemPedido->quantidade = $iten->qty;
         $itensPedidos[] = $itemPedido;
     }
     if (Cart::count() != 0) {
         $pedidoAtual->itens()->saveMany($itensPedidos);
         $pedidoAtual->save();
         Cart::destroy();
         Flash::success("Pedido finalizado!");
     } else {
         Flash::error("Por favor, adicione algum item no pedido!");
     }
     return redirect()->back();
 }
開發者ID:Brendow007,項目名稱:meuprojeto,代碼行數:38,代碼來源:CarrinhoController.php

示例13: getOAuth2AccessToken

 /**
  * 通過code換取網頁授權access_token
  * {
  *  "access_token": "OezXcEiiBSKSxW0eoylIeLbTirX__QgA7uW8WJE0Z2izAbnXV7DHbdHni-j9OoCq2Xqh5gLlPt0uAHtfYByOH80h1dwMrq74iALd_K359JYEN5KWKB7_sEz3T19V86sP9lSO5ZGbc-qoXUD3XZjEPw",
  *  "expires_in": 7200,
  *  "refresh_token": "OezXcEiiBSKSxW0eoylIeLbTirX__QgA7uW8WJE0Z2izAbnXV7DHbdHni-j9OoCqgBFR_ApctbH4Tk5buv8Rr3zb7T3_27zZXWIdJrmbGFoFzGUfOvnwX249iPoeNJ2HYDbzW5sEfZHkC5zS4Qr8ug",
  *  "openid": "oMzBIuI7ctx3n-kZZiixjchzBKLw",
  *  "scope": "snsapi_base"
  * }
  **/
 public function getOAuth2AccessToken(Request $request)
 {
     $code = $request->input('code');
     $res = AccessTokenService::getOAuth2AccessToken($code);
     Log::info($res);
     return response($res)->header('Content-Type', 'JSON');
 }
開發者ID:guoshijie,項目名稱:weixin_php,代碼行數:17,代碼來源:AccessController.php

示例14: updateCommand

 function updateCommand($git, $branch, $location, $domainId)
 {
     return Remote::run(['cd ' . base_path() . '; ~/.composer/vendor/bin/envoy run update --git=' . $git . ' --branch=' . $branch . ' --location=' . $location], function ($line) {
         Log::info($line);
         echo $line . '<br />';
     });
 }
開發者ID:codeboard,項目名稱:gitmanagement,代碼行數:7,代碼來源:TaskRunner.php

示例15: verifyNotify

 /**
  * 針對notify_url驗證消息是否是支付寶發出的合法消息
  * @return 驗證結果
  */
 function verifyNotify()
 {
     if (empty($_POST)) {
         //判斷POST來的數組是否為空
         return false;
     } else {
         //生成簽名結果
         $isSign = $this->getSignVerify($_POST, $_POST["sign"], true);
         //獲取支付寶遠程服務器ATN結果(驗證是否是支付寶發來的消息)
         $responseTxt = 'true';
         if (!empty($_POST["notify_id"])) {
             $responseTxt = $this->getResponse($_POST["notify_id"]);
         }
         //寫日誌記錄
         if ($this->alipay_config['log'] || true) {
             if ($isSign) {
                 $isSignStr = 'true';
             } else {
                 $isSignStr = 'false';
             }
             $log_text = "[===AliPay Notify===]responseTxt=" . $responseTxt . "\n notify_url_log:isSign=" . $isSignStr . "\n";
             $log_text = $log_text . $this->createLinkString($_POST);
             Log::info($log_text);
         }
         //驗證
         //$responseTxt的結果不是true,與服務器設置問題、合作身份者ID、notify_id一分鍾失效有關
         //isSign的結果不是true,與安全校驗碼、請求時的參數格式(如:帶自定義參數等)、編碼格式有關
         if (preg_match("/true\$/i", $responseTxt) && $isSign) {
             return true;
         } else {
             return false;
         }
     }
 }
開發者ID:devsnippet,項目名稱:alipay-1,代碼行數:38,代碼來源:WebPay.php


注:本文中的Illuminate\Support\Facades\Log::info方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。