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


PHP Log::debug方法代码示例

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


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

示例1: fire

 /**
  * Function that gets called on a job
  * Push::queue('smsSender', $emergency);
  *
  * @param $job
  * @param Emergency $emergency
  */
 public function fire($job, $image)
 {
     $s3 = AWS::get('s3');
     $image = Image::find($image['id']);
     if (!$image) {
         return $job->delete();
     }
     try {
         $imageUtil = new ImageUtil($image->origin);
         $galleryImageUtil = new ImageUtil($image->origin);
     } catch (Exception $e) {
         return $job->delete();
     }
     $image->thumbnail = $this->uploadImage($s3, $imageUtil->resize2('thumbnail')->getImage());
     Log::debug("From queue: Thumbnail: width - {$imageUtil->getWidth()}, height - {$imageUtil->getHeight()}");
     Log::debug("Thumbnail URL: {$image->thumbnail}");
     $this->preventMemoryLeak();
     $image->regular = $this->uploadImage($s3, $galleryImageUtil->resize2('gallery')->getImage());
     Log::debug("From queue: Gallery: width - {$galleryImageUtil->getWidth()}, height - {$galleryImageUtil->getHeight()}");
     Log::debug("Gallery URL: {$image->regular}");
     $this->preventMemoryLeak();
     $image->width = $galleryImageUtil->getWidth();
     $image->height = $galleryImageUtil->getHeight();
     $image->save();
     return $job->delete();
 }
开发者ID:SenhorBardell,项目名称:yol,代码行数:33,代码来源:ImagesResizeQueue.php

示例2: index

 public function index()
 {
     $items = array('items' => ['Pack luggage', 'Go to airport', 'Arrive in San Juan']);
     //dd($items);
     \Log::debug($items);
     return view('welcome');
 }
开发者ID:RicardoR,项目名称:Laravel5,代码行数:7,代码来源:WelcomeController.php

示例3: store

 /**
  * Store a newly created resource in storage.
  *
  * @return Response
  */
 public function store()
 {
     Log::debug('IPN receiver - $_POST array: ' . print_r($_POST, TRUE));
     $ipnOrder = IPN::getOrder();
     Log::debug('IPN receiver - After processing... IPN order: ' . print_r($ipnOrder, TRUE));
     $orderItem = $ipnOrder->items->first();
     $order = Order::find((int) $orderItem->item_number);
     $order->paypal_txn_id = $ipnOrder->txn_id;
     $order->paypal_fee = $ipnOrder->mc_fee;
     $order->ipn_order_id = $ipnOrder->id;
     //$order->id = (int) $orderItem->item_number;
     if ($ipnOrder->memo) {
         $order->order_notes .= "\n\n" . $ipnOrder->memo;
     }
     if ($order->delivery_terms == 'mp3_only') {
         $order->order_status = 'Completed';
     } else {
         $order->order_status = 'Payment Received';
     }
     $order->save();
     // After the order is persisted to IPN tables,
     // we send e-mail notification to customer.
     // This ensures that e-mail confirmation is sent,
     // if customer does NOT return to our site.
     $result = OrdersController::sendEmailConfirmationExternal($order);
 }
开发者ID:marciocamello,项目名称:laravel-ecommerce,代码行数:31,代码来源:IpnController.php

示例4: getDbHostipId

 private static function getDbHostipId($dbh, $hostip)
 {
     if ($hostip != "") {
         Log::debug("Retrieving info for ip '{$hostip}'...");
     }
     $host = self::safeGethostbyaddr($hostip);
     $select = $dbh->prepare("SELECT a.id FROM hostip a WHERE hostip = ? AND host = ?");
     $select->bindValue(1, $hostip, PDO::PARAM_STR);
     $select->bindValue(2, $host, PDO::PARAM_STR);
     $select->execute();
     $select->bindColumn(1, $id, PDO::PARAM_STR);
     if ($select->fetch(PDO::FETCH_BOUND) === false) {
         $geoipRecord = self::safeGetGeoipRecord($hostip);
         if (!Options::pretend()) {
             $insert = $dbh->prepare("INSERT INTO hostip (hostip, host, continentcode, countrycode, countryname, region, city, postalcode, latitude, longitude) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
             $insert->bindValue(1, $hostip, PDO::PARAM_STR);
             $insert->bindValue(2, $host, PDO::PARAM_STR);
             $insert->bindValue(3, $geoipRecord["continent_code"], PDO::PARAM_STR);
             $insert->bindValue(4, $geoipRecord["country_code"], PDO::PARAM_STR);
             $insert->bindValue(5, $geoipRecord["country_name"], PDO::PARAM_STR);
             $insert->bindValue(6, $geoipRecord["region"], PDO::PARAM_STR);
             $insert->bindValue(7, $geoipRecord["city"], PDO::PARAM_STR);
             $insert->bindValue(8, $geoipRecord["postal_code"], PDO::PARAM_STR);
             $insert->bindValue(9, $geoipRecord["latitude"], PDO::PARAM_STR);
             $insert->bindValue(10, $geoipRecord["longitude"], PDO::PARAM_STR);
             $insert->execute();
             $id = $dbh->lastInsertId();
         } else {
             $id = false;
         }
     }
     return $id;
 }
开发者ID:TheBillPleaseZA,项目名称:phplogmon,代码行数:33,代码来源:QueryHostip.class.php

示例5: __setup_crawl__

 /**
  * Planet クロールする
  **/
 public static function __setup_crawl__()
 {
     $http_feed = new Feed();
     foreach (C(PlanetSubscription)->find_all() as $subscription) {
         Exceptions::clear();
         Log::debug(sprintf('[crawl] feed: %d (%s)', $subscription->id(), $subscription->title()));
         try {
             $feed = $http_feed->do_read($subscription->rss_url());
             $subscription->title($feed->title());
             if ($feed->is_link()) {
                 $subscription->link(self::_get_link_href($feed->link()));
             }
             $subscription->rss_url($http_feed->url());
             $subscription->save(true);
             foreach ($feed->entry() as $entry) {
                 Exceptions::clear();
                 try {
                     $planet_entry = new PlanetEntry();
                     $planet_entry->subscription_id($subscription->id());
                     $planet_entry->title(Tag::cdata($entry->title()));
                     $planet_entry->description(Text::htmldecode(Tag::cdata($entry->fm_content())));
                     $planet_entry->link($entry->first_href());
                     $planet_entry->updated($entry->published());
                     $planet_entry->save();
                 } catch (Exception $e) {
                     Log::warn($e->getMessage());
                 }
             }
         } catch (Exception $e) {
             Log::error($e);
         }
     }
 }
开发者ID:riaf,项目名称:Planet,代码行数:36,代码来源:Planet.php

示例6: create

 public static function create($path)
 {
     Log::debug("Reading monitor configuration from directory '{$path}'...");
     $xmls = self::scanXmls($path);
     $reader = new MonitorXmlReader();
     $monitor = new self();
     foreach ($xmls as $xml) {
         if ($reader->read(Files::path($path, $xml))) {
             foreach ($reader->getSources() as $source) {
                 $monitor->tReadSources[] = $source;
                 Log::debug("Read source '{$source}'");
             }
             foreach ($reader->getNetworkmaps() as $networkmap) {
                 $monitor->tReadNetworkmaps[] = $networkmap;
                 Log::debug("Read network map '{$networkmap}'");
             }
             foreach ($reader->getUserdbs() as $userdb) {
                 $monitor->tReadUserdbs[] = $userdb;
                 Log::debug("Read user db '{$userdb}'");
             }
             foreach ($reader->getEvents() as $event) {
                 $monitor->tReadEvents[] = $event;
                 Log::debug("Read event '{$event}'");
             }
         }
     }
     self::validateSourceReferences($monitor->tReadSources, $monitor->tReadNetworkmaps, $monitor->tReadUserdbs, $monitor->tReadEvents);
     $monitor->tEnabledSources = self::filterUnreferencedSources(self::filterDuplicateSources($monitor->tReadSources), $monitor->tReadNetworkmaps, $monitor->tReadUserdbs, $monitor->tReadEvents);
     if (count($monitor->tEnabledSources) == 0) {
         Log::err("Found no active source/events definitions while reading monitor configuration from directory '{$path}'");
         $monitor = false;
     }
     return $monitor;
 }
开发者ID:TheBillPleaseZA,项目名称:phplogmon,代码行数:34,代码来源:Monitor.class.php

示例7: callRest

 /**
  * sends POST request to REST service via CURL
  * @param string $url URL to call
  * @param string $postArgs POST args
  */
 public function callRest($url, $postArgs)
 {
     if (!function_exists("curl_init")) {
         $this->last_error = 'ERROR_NO_CURL';
         Log::fatal("REST call failed - no cURL!");
         return false;
     }
     $curl = curl_init($url);
     curl_setopt($curl, CURLOPT_POST, true);
     curl_setopt($curl, CURLOPT_HEADER, false);
     curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
     curl_setopt($curl, CURLOPT_POSTFIELDS, $postArgs);
     curl_setopt($curl, CURLOPT_TIMEOUT, 10);
     curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
     curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0);
     Log::debug("HTTP client call: {$url} -> {$postArgs}");
     $response = curl_exec($curl);
     if ($response === false) {
         $this->last_error = 'ERROR_REQUEST_FAILED';
         $curl_errno = curl_errno($curl);
         $curl_error = curl_error($curl);
         Log::error("HTTP client: cURL call failed: error {$curl_errno}: {$curl_error}");
         return false;
     }
     Log::debug("HTTP client response: {$response}");
     curl_close($curl);
     return $response;
 }
开发者ID:butschster,项目名称:sugarcrm_dev,代码行数:33,代码来源:SugarHttpClient.php

示例8: mainDoor

 public function mainDoor()
 {
     $receivedData = trim(\Input::get('data'));
     //Log::debug("New System. Entry message received: ".$receivedData);
     //What access point is this?
     $this->buildingAccess->setDeviceKey('main-door');
     try {
         //Decode the message and store the message parameters in the building access object
         $this->buildingAccess->decodeDeviceCommand($receivedData);
         //Verify everything is good
         $this->buildingAccess->validateData();
     } catch (\BB\Exceptions\ValidationException $e) {
         \Log::debug("Entry message received - failed: " . $receivedData);
         //The data was invalid or the user doesnt have access
         $response = \Response::make(json_encode(['valid' => '0', 'msg' => $e->getMessage()]) . PHP_EOL, 200);
         $response->headers->set('Content-Length', strlen($response->getContent()));
         return $response;
     }
     //Is this a system message
     if ($this->buildingAccess->isSystemMessage()) {
         return $this->handleSystemMessage($receivedData);
     }
     $this->buildingAccess->logSuccess();
     $userName = substr($this->buildingAccess->getUser()->given_name, 0, 20);
     $responseBody = json_encode(['valid' => '1', 'msg' => $userName]);
     $response = \Response::make($responseBody . PHP_EOL, 200);
     $response->headers->set('Content-Length', strlen($response->getContent()));
     return $response;
 }
开发者ID:adamstrawson,项目名称:BBMembershipSystem,代码行数:29,代码来源:AccessControlController.php

示例9: insert

 public static function insert($interaction)
 {
     if (is_null(self::$db)) {
         self::boot();
     }
     // Skip messages that doesn't have content
     if (!isset($interaction['interaction']['content']) || empty($interaction['interaction']['content'])) {
         Log::debug('Skipping due to no content ' . $interaction['interaction']['type'] . ': ' . $interaction['interaction']['author']['name']);
         return;
     }
     // Logging
     Log::debug('Adding ' . $interaction['interaction']['type'] . ': ' . $interaction['interaction']['author']['name']);
     // Strip any HTML tags in the content
     $interaction['interaction']['content'] = strip_tags($interaction['interaction']['content']);
     // Insert into database and broadcast to WebSocket server
     self::ensureStreamConnected();
     // Make sure that filter id is an integer
     $interaction['internal']['filter_id'] = (int) $interaction['internal']['filter_id'];
     try {
         self::$db->interactions->insert($interaction, array('w' => true));
         if (@fwrite(self::$client, json_encode($interaction) . "\n") === false) {
             Log::info('Could not write to client');
         }
     } catch (\MongoCursorException $e) {
         if ($e->getCode() != 11000) {
             // "Duplicate key" errors are ignored
             Log::error($e->getMessage());
         }
     }
 }
开发者ID:wisutsak,项目名称:ElectionDesk,代码行数:30,代码来源:Interaction.php

示例10: handle

 /**
  * Execute the job.
  *
  * @return void
  */
 public function handle()
 {
     //Create the Phone
     $phone = Phone::firstOrCreate(['name' => $this->device['DeviceName'], 'description' => $this->device['Description'], 'model' => $this->device['Model']]);
     // Create the IpAddress
     $ipAddress = IpAddress::firstOrCreate(['ip_address' => $this->device['IpAddress']]);
     // Attach the Phone and IpAddress
     $phone->ipAddresses()->sync([$ipAddress->id], false);
     //Start creating Eraser
     $tleObj = Eraser::create(['device_id' => $phone->id, 'ip_address_id' => $ipAddress->id, 'type' => $this->device['type']]);
     if (isset($this->device['bulk_id'])) {
         $tleObj->bulks()->attach($this->device['bulk_id']);
     }
     if ($this->device['IpAddress'] == "Unregistered/Unknown") {
         $tleObj->result = 'Fail';
         $tleObj->fail_reason = 'Unregistered/Unknown';
         $tleObj->save();
     }
     $keys = setKeys($this->device['Model'], $this->device['type']);
     if (!$keys) {
         $tleObj->result = 'Fail';
         $tleObj->fail_reason = 'Unsupported Model';
         $tleObj->save();
         \Log::debug('Bulk', [$tleObj]);
         return;
     }
     $dialer = new PhoneDialer($tleObj, $this->cluster);
     $status = $dialer->dial($keys);
     //Successful if returned true
     $passFail = $status ? 'Success' : 'Fail';
     $tleObj->result = $passFail;
     $tleObj->save();
 }
开发者ID:sloan58,项目名称:uc-insight-esk,代码行数:38,代码来源:ControlPhone.php

示例11: log

 public static function log($return, $context = array())
 {
     if (is_array($return)) {
         $return = json_encode($return, JSON_UNESCAPED_UNICODE);
     }
     \Log::debug($return, $context);
 }
开发者ID:xjtuwangke,项目名称:laravel-app-push,代码行数:7,代码来源:PushServiceProvider.php

示例12: _init

 /**
  * initializes the cache in question
  */
 protected static function _init()
 {
     $lastPriority = 1000;
     $locations = ['include/SugarCache', 'custom/include/SugarCache'];
     foreach ($locations as $location) {
         if (sugar_is_dir($location) && ($dir = opendir($location))) {
             while (($file = readdir($dir)) !== false) {
                 if ($file == ".." || $file == "." || !is_file("{$location}/{$file}")) {
                     continue;
                 }
                 require_once "{$location}/{$file}";
                 $cacheClass = basename($file, ".php");
                 if (class_exists($cacheClass) && is_subclass_of($cacheClass, 'SugarCacheAbstract')) {
                     Log::debug("Found cache backend {$cacheClass}");
                     $cacheInstance = new $cacheClass();
                     if ($cacheInstance->useBackend() && $cacheInstance->getPriority() < $lastPriority) {
                         Log::debug("Using cache backend {$cacheClass}, since " . $cacheInstance->getPriority() . " is less than " . $lastPriority);
                         self::$_cacheInstance = $cacheInstance;
                         $lastPriority = $cacheInstance->getPriority();
                     }
                 }
             }
         }
     }
 }
开发者ID:butschster,项目名称:sugarcrm_dev,代码行数:28,代码来源:SugarCache.php

示例13: validate_authenticated

 /**
  * Validate the provided session information is correct and current.  Load the session.
  *
  * @param String $session_id -- The session ID that was returned by a call to login.
  * @return true -- If the session is valid and loaded.
  * @return false -- if the session is not valid.
  */
 function validate_authenticated($session_id)
 {
     Log::info('Begin: SoapHelperWebServices->validate_authenticated');
     if (!empty($session_id)) {
         // only initialize session once in case this method is called multiple times
         if (!session_id()) {
             session_id($session_id);
             session_start();
         }
         if (!empty($_SESSION['is_valid_session']) && $this->is_valid_ip_address('ip_address') && $_SESSION['type'] == 'user') {
             global $current_user;
             require_once 'modules/Users/User.php';
             $current_user = new User();
             $current_user->retrieve($_SESSION['user_id']);
             $this->login_success();
             Log::info('Begin: SoapHelperWebServices->validate_authenticated - passed');
             Log::info('End: SoapHelperWebServices->validate_authenticated');
             return true;
         }
         Log::debug("calling destroy");
         session_destroy();
     }
     LogicHook::instance()->call_custom_logic('Users', 'login_failed');
     Log::info('End: SoapHelperWebServices->validate_authenticated - validation failed');
     return false;
 }
开发者ID:butschster,项目名称:sugarcrm_dev,代码行数:33,代码来源:SugarWebServiceUtilv4_1.php

示例14: register

 public function register()
 {
     \Log::debug("FrontendServiceProvider registered");
     // Register facades
     $this->app->booting(function () {
     });
 }
开发者ID:parabol,项目名称:laravel-cms,代码行数:7,代码来源:FrontendServiceProvider.php

示例15: verifyDomainName

 /**
  * Convert IDN names and verify the validity and specification constraints
  * @param string $domainName Domain name
  * @return string
  */
 private function verifyDomainName($domainName)
 {
     Log::debug('Verify domain: ' . $domainName);
     // Since PHP does not support IDN domain names, convert to ASCII by default
     $domainName = strtolower(idn_to_ascii(trim($domainName)));
     // Validate domain name length, max length 253
     if (strlen($domainName) > 253) {
         Log::error('Domain name exceedes the max length of 253 characters: ' . $domainName);
         return false;
     }
     // Make sure there is at least one "dot"
     if (strpos($domainName, '.') === false) {
         Log::error('Domain name is missing a dot character: ' . $domainName);
         return false;
     }
     // Explode "dot" separated parts
     $parts = explode('.', $domainName);
     // Validate parts
     foreach ($parts as $p) {
         // Max length 63 characters
         if (strlen($p) > 63) {
             Log::error('A domain name part exceedes the mas length of 63 characters: ' . $p);
             return false;
         }
         // Validate characters
         if (preg_match('/^[-a-z0-9]+$/i', $p) !== 1) {
             Log::error('Invalid characters in the domain name part: ' . $p);
             return false;
         }
     }
     return $domainName;
 }
开发者ID:noumenia,项目名称:aetolos,代码行数:37,代码来源:domainhelper.inc.php


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