From f6de9c09fb34ed9eba9210e08097e1aecfaa5dad Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 27 May 2014 21:21:38 -0700 Subject: logging: include target url when reporting z_fetch_url and z_post_url errors. --- include/network.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/network.php b/include/network.php index 9f68328b7..03faf9957 100644 --- a/include/network.php +++ b/include/network.php @@ -121,8 +121,8 @@ function z_fetch_url($url, $binary = false, $redirects = 0, $opts = array()) { if(! $ret['success']) { $ret['error'] = curl_error($ch); $ret['debug'] = $curl_info; - logger('z_fetch_url: error:' . $ret['error'], LOGGER_DEBUG); - logger('z_fetch_url: debug:' . print_r($curl_info,true), LOGGER_DATA); + logger('z_fetch_url: error: ' . $url . ': ' . $ret['error'], LOGGER_DEBUG); + logger('z_fetch_url: debug: ' . print_r($curl_info,true), LOGGER_DATA); } $ret['body'] = substr($s,strlen($header)); $ret['header'] = $header; @@ -229,8 +229,8 @@ function z_post_url($url,$params, $redirects = 0, $opts = array()) { if(! $ret['success']) { $ret['error'] = curl_error($ch); $ret['debug'] = $curl_info; - logger('z_post_url: error:' . $ret['error'], LOGGER_DEBUG); - logger('z_post_url: debug:' . print_r($curl_info,true), LOGGER_DATA); + logger('z_post_url: error: ' . $url . ': ' . $ret['error'], LOGGER_DEBUG); + logger('z_post_url: debug: ' . print_r($curl_info,true), LOGGER_DATA); } $ret['body'] = substr($s,strlen($header)); -- cgit v1.2.3