From b68e56c4d6fc8c8edd3b9afe1e85886f0e54d436 Mon Sep 17 00:00:00 2001 From: spag Date: Tue, 29 Jan 2013 09:31:17 +0100 Subject: log level on failures --- misc/freeswitch/scripts/http_request.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'misc') 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 -- cgit v1.2.3