Summary: | ASTERISK-11651: Use ast_verb instead of ast_debug for channel driver debugging | ||
Reporter: | dea (dea) | Labels: | |
Date Opened: | 2008-03-16 01:44:31 | Date Closed: | 2008-04-09 13:27:37 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | Channels/chan_skinny |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) chan_skinny-debug-log.txt | |
Description: | When turning on channel driver specific debugging (skinny set debug on), it is cleaner to use ast_verb instead of ast_debug. With core verbose set to 1, there is not a lot of output to the log or console, but when core debug is set to 1 the logs can get quite crowded. MVanbaak- I do not believe I can assign reports/tickets, so I leave it to one of our administrators or bug marshalls to assign it to you. | ||
Comments: | By: Tilghman Lesher (tilghman) 2008-03-16 10:12:38 What's wrong with using the file-specific debugging, as in: CLI> core set debug 5 chan_skinny.so This turns on debugging ONLY for that one file, which is probably what you're aiming to see. By: dea (dea) 2008-03-16 10:57:09 That almost works. The majority of the debug logging in chan_skinny, as well as a number of other files, happen to be protected by channel/app specific debug commands. So it would take two cli commands to produce any output. This patch semi-reverts one of the changes made when all logging was converted to the ast_verb and ast_debug macros. Prior to that conversion the majority of chan_skinny debug output was protected by 'skinny set debug' and used ast_verbose. After the conversion the same protected logging statements were now ast_debug. By: Tilghman Lesher (tilghman) 2008-03-16 11:11:17 Instead of doing that, I'd recommend that you remove the skinny_debug flag, so that there's a COMMON interface for debugging for all files, rather than doing something different for skinny. By: dea (dea) 2008-03-16 12:16:39 Common? Channels that use a local debug variable & ast_verb (15%) IAX2 MGCP Unistim Channels that use a local debug variable & ast_debug: (15%) H323 SIP Skinny (used to be verbose) Channels that use a local debug and raw CLI output (15%) MISDN OSS (uses ast_log) USBRadio (ast_log) Channels that use ast_debug alone (55%) gtalk Agent ALSA Console Features Jingle NBS Phone VPB ZAP Local To make it even more interesting, I would not want to just strip out the skinny_debug flag, I would want to try to assign each message to a valid level. So I gave a quick look at the other channels use of ast_debug. 67% of all channel debuging is at level 1 13% is at level 3 13% is at level 4 7% is at level 2 .1% is at level 5 I know that it has been discussed in the past to try defining what type of reporting is desired at each level, but I have not located any documentation to suggest a concensus was reached. In any case I guess the only way forward would be to stip skinny_debug and leave everything at debug level 1 for now so that we can be moving towards the common interface. Even so, chan_skinny is far from unique in this regard. By: Digium Subversion (svnbot) 2008-04-09 12:36:23 Repository: asterisk Revision: 113834 U trunk/channels/chan_skinny.c ------------------------------------------------------------------------ r113834 | qwell | 2008-04-09 12:36:19 -0500 (Wed, 09 Apr 2008) | 7 lines Move all messages wrapped in skinnydebug from debug to verbose. (closes issue ASTERISK-11651) Reported by: DEA Patches: chan_skinny-debug-log.txt uploaded by DEA (license 3) ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=113834 By: Digium Subversion (svnbot) 2008-04-09 12:36:50 Repository: asterisk Revision: 113835 _U branches/1.6.0/ ------------------------------------------------------------------------ r113835 | qwell | 2008-04-09 12:36:50 -0500 (Wed, 09 Apr 2008) | 14 lines Blocked revisions 113834 via svnmerge ........ r113834 | qwell | 2008-04-09 12:41:09 -0500 (Wed, 09 Apr 2008) | 7 lines Move all messages wrapped in skinnydebug from debug to verbose. (closes issue ASTERISK-11651) Reported by: DEA Patches: chan_skinny-debug-log.txt uploaded by DEA (license 3) ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=113835 By: Digium Subversion (svnbot) 2008-04-09 13:27:37 Repository: asterisk Revision: 113872 _U team/group/codec_bits/ U team/group/codec_bits/channels/chan_h323.c U team/group/codec_bits/channels/chan_skinny.c U team/group/codec_bits/contrib/scripts/astcli U team/group/codec_bits/main/pbx.c ------------------------------------------------------------------------ r113872 | tilghman | 2008-04-09 13:27:35 -0500 (Wed, 09 Apr 2008) | 44 lines Merged revisions 113834,113836,113838,113840 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ........ r113834 | qwell | 2008-04-09 12:41:09 -0500 (Wed, 09 Apr 2008) | 7 lines Move all messages wrapped in skinnydebug from debug to verbose. (closes issue ASTERISK-11651) Reported by: DEA Patches: chan_skinny-debug-log.txt uploaded by DEA (license 3) ........ r113836 | mmichelson | 2008-04-09 12:48:33 -0500 (Wed, 09 Apr 2008) | 14 lines There was a subtle logical difference between 1.4 and trunk with regards to how timeouts were handled. In 1.4, if the absolute timeout were reached on a call, no matter what the return value of ast_spawn_extension was, the pbx would attempt to go to the 'T' extension or hangup otherwise. The rearrangement of this function in trunk made this check only happen in the case that ast_spawn_extension returned 0. If ast_spawn_extension returned 1, then the fact that the timeout expired resulted in a no-op, and would cause an infinite loop to occur in __ast_pbx_run. This change fixes this problem. Now timeouts will behave as they did in 1.4 (closes issue ASTERISK-11038) Reported by: pj Tested by: putnopvut ........ r113838 | qwell | 2008-04-09 12:56:07 -0500 (Wed, 09 Apr 2008) | 2 lines Fix a small file handle "leak" pointed out by jjshoe on #asterisk. ........ r113840 | file | 2008-04-09 13:05:40 -0500 (Wed, 09 Apr 2008) | 4 lines Enable enough RTP bridging to allow P2P to work. (closes issue ASTERISK-11355) Reported by: pj ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=113872 |