[asterisk-commits] kmoore: trunk r412566 - in /trunk: ./ main/ res/ res/ari/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Apr 18 09:25:53 CDT 2014


Author: kmoore
Date: Fri Apr 18 09:25:47 2014
New Revision: 412566

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=412566
Log:
ARI: Add debug logging for events and responses

This adds DEBUG level logging for ARI websocket events and HTTP
responses similar to what is available for AMI. Logging for ARI HTTP
requests is already adequate for debugging purposes.
........

Merged revisions 412565 from http://svn.asterisk.org/svn/asterisk/branches/12

Modified:
    trunk/   (props changed)
    trunk/main/manager.c
    trunk/res/ari/ari_websockets.c
    trunk/res/res_ari.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-12-merged' - no diff available.

Modified: trunk/main/manager.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/manager.c?view=diff&rev=412566&r1=412565&r2=412566
==============================================================================
--- trunk/main/manager.c (original)
+++ trunk/main/manager.c Fri Apr 18 09:25:47 2014
@@ -5174,7 +5174,7 @@
 {
 	int result = 0;
 
-	ast_debug(3, "Examining event:\n%s\n", eventdata);
+	ast_debug(3, "Examining AMI event:\n%s\n", eventdata);
 	if (!ao2_container_count(s->session->whitefilters) && !ao2_container_count(s->session->blackfilters)) {
 		return 1; /* no filtering means match all */
 	} else if (ao2_container_count(s->session->whitefilters) && !ao2_container_count(s->session->blackfilters)) {

Modified: trunk/res/ari/ari_websockets.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/ari/ari_websockets.c?view=diff&rev=412566&r1=412565&r2=412566
==============================================================================
--- trunk/res/ari/ari_websockets.c (original)
+++ trunk/res/ari/ari_websockets.c Fri Apr 18 09:25:47 2014
@@ -162,6 +162,7 @@
 		return -1;
 	}
 
+	ast_debug(3, "Examining ARI event: \n%s\n", str);
 	return ast_websocket_write(session->ws_session,
 		AST_WEBSOCKET_OPCODE_TEXT, str,	strlen(str));
 }

Modified: trunk/res/res_ari.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/res_ari.c?view=diff&rev=412566&r1=412565&r2=412566
==============================================================================
--- trunk/res/res_ari.c (original)
+++ trunk/res/res_ari.c Fri Apr 18 09:25:47 2014
@@ -978,6 +978,8 @@
 		}
 	}
 
+	ast_debug(3, "Examining ARI response:\n%d %s\n%s\n%s\n", response.response_code,
+		response.response_text, ast_str_buffer(response.headers), ast_str_buffer(response_body));
 	ast_http_send(ser, method, response.response_code,
 		      response.response_text, response.headers, response_body,
 		      0, 0);




More information about the asterisk-commits mailing list