[asterisk-commits] kmoore: branch 12 r412565 - in /branches/12: main/ res/ res/ari/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Apr 18 09:21:48 CDT 2014
Author: kmoore
Date: Fri Apr 18 09:21:34 2014
New Revision: 412565
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=412565
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.
Modified:
branches/12/main/manager.c
branches/12/res/ari/ari_websockets.c
branches/12/res/res_ari.c
Modified: branches/12/main/manager.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/main/manager.c?view=diff&rev=412565&r1=412564&r2=412565
==============================================================================
--- branches/12/main/manager.c (original)
+++ branches/12/main/manager.c Fri Apr 18 09:21:34 2014
@@ -5172,7 +5172,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: branches/12/res/ari/ari_websockets.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/res/ari/ari_websockets.c?view=diff&rev=412565&r1=412564&r2=412565
==============================================================================
--- branches/12/res/ari/ari_websockets.c (original)
+++ branches/12/res/ari/ari_websockets.c Fri Apr 18 09:21:34 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: branches/12/res/res_ari.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/res/res_ari.c?view=diff&rev=412565&r1=412564&r2=412565
==============================================================================
--- branches/12/res/res_ari.c (original)
+++ branches/12/res/res_ari.c Fri Apr 18 09:21:34 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