<span style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt">Hello, I wanted to be able to dump status codes to stdout without having to set the logging level to Debug and get all of the extra info. Here's a simple patch to print the status code and description returned from the servers at the Info level so you can get a quick idea of what's going on. Let me know what ya'll think, thanks!<br />
<br />
Index: amf.c<br />
===================================================================<br />
--- amf.c (revision 548)<br />
+++ amf.c (working copy)<br />
@@ -1145,11 +1145,21 @@<br />
AMF_Dump(AMFObject *obj)<br />
{<br />
int n;<br />
+ char str[1024] = "";<br />
RTMP_Log(RTMP_LOGDEBUG, "(object begin)");<br />
for (n = 0; n < obj->o_num; n++)<br />
{<br />
AMFProp_Dump(&obj->o_props[n]);<br />
+ if (obj->o_props[n].p_name.av_len && strncmp(obj->o_props[n].p_name.av_val, "code", 4) == 0 && <br />
+ obj->o_props[n].p_type == AMF_STRING)<br />
+ snprintf(str, 1024, "%s", obj->o_props[n].p_vu.p_aval.av_val);<br />
+ if (obj->o_props[n].p_name.av_len && strncmp(obj->o_props[n].p_name.av_val, "description", 11) == 0 && <br />
+ obj->o_props[n].p_type == AMF_STRING)<br />
+ snprintf(str, 1024, "%s: %s", str, obj->o_props[n].p_vu.p_aval.av_val);<br />
}<br />
+ // dump status at info level<br />
+ if (strlen(str) > 1 && RTMP_LogGetLevel() <= RTMP_LOGINFO)<br />
+ RTMP_Log(RTMP_LOGINFO, str);<br />
RTMP_Log(RTMP_LOGDEBUG, "(object end)");<br />
}<br /></span>