summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorspag <spag@golwen.net>2013-01-29 09:31:17 +0100
committerspag <spag@golwen.net>2013-01-29 09:31:17 +0100
commitb68e56c4d6fc8c8edd3b9afe1e85886f0e54d436 (patch)
tree5f3a06c343d9a858b13eb02a630fe08048c2efe1 /misc
parentfd95d2c2fcc50418cdb23f34b21bcfe04d9cc1de (diff)
log level on failures
Diffstat (limited to 'misc')
-rw-r--r--misc/freeswitch/scripts/http_request.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/misc/freeswitch/scripts/http_request.lua b/misc/freeswitch/scripts/http_request.lua
index 8acdcb6..1d6f791 100644
--- a/misc/freeswitch/scripts/http_request.lua
+++ b/misc/freeswitch/scripts/http_request.lua
@@ -28,4 +28,9 @@ if user and password then
end
local success, result, response_headers = http.request{url = url, headers = headers };
-log:debug('HTTP_REQUEST - url: ', url, ', auth: ', tostring(headers.Authorization ~= nil), ', result: ', result);
+
+if success then
+ log:debug('HTTP_REQUEST - url: ', url, ', auth: ', tostring(headers.Authorization ~= nil), ', result: ', result);
+else
+ log:notice('HTTP_REQUEST - url: ', url, ', auth: ', tostring(headers.Authorization ~= nil), ', result: ', result);
+end