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


PHP Logger::debug方法代码示例

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


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

示例1: run

 public function run(Command $cmd)
 {
     $command = $this->bin . ' ' . (string) $cmd;
     $this->logger->debug('Command : `' . $command . '``');
     $proc = popen((string) $command, 'r');
     while (($line = fgets($proc)) !== false) {
         foreach ($this->handler as $handler) {
             $handler->handle($line, $this, $cmd);
         }
     }
     $this->logger->info('Done.');
     /** @var HandlerInterface[] $handlers */
     return array_merge($this->handler, $this->ignoredHandler);
 }
开发者ID:eoko,项目名称:wpscan,代码行数:14,代码来源:Client.php

示例2: doRequest

 public static function doRequest($url, array $postData = null, $method = Request::METHOD_GET)
 {
     $client = self::getClientInstance();
     $client->resetParameters();
     $client->setEncType(Client::ENC_URLENCODED);
     $client->setUri($url);
     $client->setMethod($method);
     if ($postData === null) {
         $postData = array();
     }
     $postData['access_token'] = self::getSession()->accessToken;
     if ($method == Request::METHOD_POST && $postData !== null) {
         $client->setParameterPost($postData);
     }
     if (($method == Request::METHOD_GET || $method == Request::METHOD_DELETE) && $postData !== null) {
         $client->setParameterGet($postData);
     }
     $response = $client->send();
     if ($response->isSuccess()) {
         return JsonDecoder::decode($response->getBody(), Json::TYPE_ARRAY);
     } else {
         $logger = new Logger();
         $logger->addWriter(new Stream('data/logs/apiclient.log'));
         $logger->debug($response->getBody());
         return FALSE;
     }
 }
开发者ID:v2-labs,项目名称:cellavita-web,代码行数:27,代码来源:ApiClient.php

示例3: log

 public function log()
 {
     $mailLog = null;
     /** @var \Zend\Mail\Transport\Smtp $mailTransport */
     $mailTransport = $this->sxMail->getTransport();
     if ($mailTransport instanceof \Zend\Mail\Transport\Smtp || is_callable([$mailTransport, 'getConnection'])) {
         $mailLog = $mailTransport->getConnection()->getLog();
     }
     if ($mailLog) {
         $this->logger->debug($mailLog);
     }
 }
开发者ID:peteraba,项目名称:dm-mailer,代码行数:12,代码来源:Queue.php

示例4: error

 /**
  * Log data into the exception log file.
  *
  * @param $title
  * @param $error
  */
 public function error($title, $error)
 {
     $this->connectorLogger->debug($title, $error);
 }
开发者ID:dotmailer,项目名称:dotmailer-magento2-extension,代码行数:10,代码来源:Data.php

示例5: doRequest

 /**
  * Perform a request to the API
  *
  * @param string $url
  * @param array $postData
  * @param Client $client
  * @return Zend\Http\Response
  * @author Christopher
  */
 protected static function doRequest($url, array $postData = null, $method = Request::METHOD_GET)
 {
     $client = self::getClientInstance();
     $client->setUri($url);
     $client->setMethod($method);
     if ($postData !== null) {
         $client->setParameterPost($postData);
     }
     $response = $client->send();
     if ($response->isSuccess()) {
         return JsonDecoder::decode($response->getBody(), Json::TYPE_ARRAY);
     } else {
         $logger = new Logger();
         $logger->addWriter(new Stream('data/logs/apiclient.log'));
         $logger->debug($response->getBody());
         return FALSE;
     }
 }
开发者ID:CPDeutschland,项目名称:zf2-api-client,代码行数:27,代码来源:ApiClient.php

示例6: loggingQuery

 public function loggingQuery($adapter)
 {
     $logger = new Logger();
     $writer = new Stream(LOG_DIR . "/query/" . date('Y-m-d'));
     $logger->addWriter($writer);
     $profiler = new Profiler();
     $adapter->setProfiler($profiler);
     $profiler->profilerStart(new StatementContainer());
     register_shutdown_function(function () use($logger, $profiler) {
         $profilers = $profiler->getProfiles();
         if ($profilers) {
             foreach ($profilers as $profile) {
                 $logger->debug($profile['sql']);
             }
         }
     });
 }
开发者ID:jonathan1212,项目名称:zf2,代码行数:17,代码来源:Module.php

示例7: testLogWritesWithModifiedTimestampFormat

 /**
  * @group ZF-9870
  */
 public function testLogWritesWithModifiedTimestampFormat()
 {
     $logger = new Logger($this->writer);
     $logger->setTimestampFormat('Y-m-d');
     $logger->debug('ZF-9870');
     rewind($this->log);
     $message = stream_get_contents($this->log);
     $this->assertEquals(date('Y-m-d'), substr($message, 0, 10));
 }
开发者ID:heiglandreas,项目名称:zf2,代码行数:12,代码来源:LoggerTest.php

示例8: log

 public function log($text)
 {
     $this->logger->debug($text);
 }
开发者ID:zhangyuxiao,项目名称:qoros,代码行数:4,代码来源:Wechat.php

示例9: doRequestAuth

 /**
  * Perform a request to the API
  *
  * @param string $url
  * @param array $postData
  * @param Client $client
  * @return Zend\Http\Response
  */
 protected static function doRequestAuth($url, $decodeType = Json::TYPE_OBJECT, array $postData = null, $method = Request::METHOD_GET)
 {
     $client = self::getClientInstance();
     $client->setUri($url);
     $client->setMethod($method);
     if ($postData !== null) {
         $client->setParameterPost($postData);
     }
     $client->setHeaders(array('Accept' => 'application/vnd.music.v1+json', 'Content-Type' => 'application/json', 'Accept-Encoding' => 'UTF-8', 'Authorization' => self::$token->token_type . ' ' . self::$token->access_token));
     if ($postData !== null) {
         $client->setRawBody(Json::encode($postData, true));
         $client->setEncType('application/json');
     }
     $response = $client->send();
     if ($response->isSuccess()) {
         return JsonDecoder::decode($response->getBody(), $decodeType);
     } else {
         // FIXME: Remove on production
         $logger = new Logger();
         $logger->addWriter(new Stream('data/logs/apiclient.log'));
         $logger->debug($response->getBody());
         return $response->getBody();
     }
 }
开发者ID:omusico,项目名称:cursoZf2,代码行数:32,代码来源:AlbumService.php

示例10: debug

 /**
  * Log a debug message.
  *
  * @param string $msg Message to log.
  *
  * @return void
  */
 protected function debug($msg)
 {
     if ($this->logger) {
         $this->logger->debug($msg);
     }
 }
开发者ID:no-reply,项目名称:cbpl-vufind,代码行数:13,代码来源:SRU.php

示例11: debugPrint

 /**
  * Print a message if debug is enabled.
  *
  * @param string $msg Message to print
  *
  * @return void
  */
 protected function debugPrint($msg)
 {
     if ($this->debug && $this->logger) {
         $this->logger->debug("{$msg}\n");
     }
 }
开发者ID:no-reply,项目名称:cbpl-vufind,代码行数:13,代码来源:Summon.php


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