diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-11-09 11:44:09 +0100 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-11-09 11:44:09 +0100 |
commit | b9e330109b58fac55c3728dd3c543552fcabd353 (patch) | |
tree | 93d386ca453b4b90f517018eb63a4b64df22e8ba /vendor/fguillot/picofeed/docs/debugging.markdown | |
parent | e5d18a22c3c15acf61f97da4965a551b83df05cb (diff) |
update picofeed to 0.1.0
Diffstat (limited to 'vendor/fguillot/picofeed/docs/debugging.markdown')
-rw-r--r-- | vendor/fguillot/picofeed/docs/debugging.markdown | 54 |
1 files changed, 47 insertions, 7 deletions
diff --git a/vendor/fguillot/picofeed/docs/debugging.markdown b/vendor/fguillot/picofeed/docs/debugging.markdown index bbe1fd067..a9f8ab163 100644 --- a/vendor/fguillot/picofeed/docs/debugging.markdown +++ b/vendor/fguillot/picofeed/docs/debugging.markdown @@ -1,13 +1,18 @@ Debugging ========= -Get log messages ----------------- +Logging +------- PicoFeed log in memory the execution flow, if a feed doesn't work correctly it's easy to see what is wrong. +### Reading messages + ```php -print_r(PicoFeed\Logging::getMessages()); +use PicoFeed\Logging\Logger; + +// All messages are stored inside an Array +print_r(Logger::getMessages()); ``` You will got an output like that: @@ -36,11 +41,46 @@ Array ) ``` -Remove messages ---------------- +### Remove messages -All messages are stored in memory, if you need to clear them just call the method `Logging::deleteMessages()`: +All messages are stored in memory, if you need to clear them just call the method `Logger::deleteMessages()`: ```php -PicoFeed\Logging::deleteMessages(); +Logger::deleteMessages(); +``` + +Command line utility +==================== + +PicoFeed provides a basic command line tool to debug feeds quickly. +The tool is located in the root directory project. + +### Usage + +```bash +$ ./picofeed +Usage: +./picofeed feed <feed-url> # Parse a feed a dump the ouput on stdout +./picofeed debug <feed-url> # Display all logging messages for a feed +./picofeed item <feed-url> <item-id> # Fetch only one item +./picofeed nofilter <feed-url> <item-id> # Fetch an item but with no content filtering +``` + +### Example + +```bash +$ ./picofeed debug https://linuxfr.org/ +Exception thrown ===> "Invalid SSL certificate" +Array +( + [0] => [2014-11-08 14:04:14] PicoFeed\Client\Curl Fetch URL: https://linuxfr.org/ + [1] => [2014-11-08 14:04:14] PicoFeed\Client\Curl Etag provided: + [2] => [2014-11-08 14:04:14] PicoFeed\Client\Curl Last-Modified provided: + [3] => [2014-11-08 14:04:16] PicoFeed\Client\Curl cURL total time: 1.850634 + [4] => [2014-11-08 14:04:16] PicoFeed\Client\Curl cURL dns lookup time: 0.00093 + [5] => [2014-11-08 14:04:16] PicoFeed\Client\Curl cURL connect time: 0.115213 + [6] => [2014-11-08 14:04:16] PicoFeed\Client\Curl cURL speed download: 0 + [7] => [2014-11-08 14:04:16] PicoFeed\Client\Curl cURL effective url: https://linuxfr.org/ + [8] => [2014-11-08 14:04:16] PicoFeed\Client\Curl cURL error: SSL certificate problem: Invalid certificate chain +) ``` |