Summary: | ASTERISK-02364: [patch] Modify level of log entry related to GotoIf when no branch taken | ||
Reporter: | kb1_kanobe2 (kb1_kanobe2) | Labels: | |
Date Opened: | 2004-09-08 00:03:54 | Date Closed: | 2008-01-15 15:07:07.000-0600 |
Priority: | Trivial | Regression? | No |
Status: | Closed/Complete | Components: | Core/General |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) asterisk-pbx-demotegotoifnotice.diff | |
Description: | This trivial patch lowers the log level of 'pbx_builtin_gotoif: Not taking any branch' from NOTICE to DEBUG. ****** ADDITIONAL INFORMATION ****** I have quite a few inline conditional branches in my dialplan along the lines of: ... exten => s,2,GotoIf($[${ARG1:0:1} = 0]?s-attendant,1) ; Global attendant exten => s,3,GotoIf($[${ARG1:0:1} = 1]?s-parkinglot,1) ; Call parking pool exten => s,4,GotoIf($[${ARG1:0:1} = 2]?s-i,1) ; {reserved - parking lot for unused Norstar DNs} exten => s,5,GotoIf($[${ARG1:0:1} = 3]?s-30,1) ; Direct Dialtone selector prefixes ... Now, the way the logging is structured in pbx.c this seems to be considered a potential problem - specifically it generates logs entries such as: Sep 7 16:34:58 NOTICE[5980180]: pbx.c:4700 pbx_builtin_gotoif: Not taking any branch It doesn't contain anything useful about the state of the dialplan or which branch is being considered. However, when in console with verbosity turned up I see: -- Executing GotoIf("Zap/23-1", "0?s-attendant|1") in new stack Sep 7 16:34:58 NOTICE[5980180]: pbx.c:4700 pbx_builtin_gotoif: Not taking any branch -- Executing GotoIf("Zap/23-1", "0?s-parkinglot|1") in new stack Sep 7 16:34:58 NOTICE[5980180]: pbx.c:4700 pbx_builtin_gotoif: Not taking any branch -- Executing GotoIf("Zap/23-1", "0?s-i|1") in new stack Sep 7 16:34:58 NOTICE[5980180]: pbx.c:4700 pbx_builtin_gotoif: Not taking any branch -- Executing GotoIf("Zap/23-1", "0?s-30|1") in new stack Sep 7 16:34:58 NOTICE[5980180]: pbx.c:4700 pbx_builtin_gotoif: Not taking any branch ... -- Executing GotoIf("Zap/23-1", "1?s-pstn|1") in new stack -- Goto (macro-dialplan-routing,s-pstn,1) Which is infinitely more useful, given the relative context. On the recommendation of Tilghman Lesher, patch attached to lower to DEBUG. | ||
Comments: | By: Mark Spencer (markster) 2004-09-09 08:58:15 Fixed in CVS, thanks! By: Digium Subversion (svnbot) 2008-01-15 15:07:07.000-0600 Repository: asterisk Revision: 3753 U trunk/pbx.c ------------------------------------------------------------------------ r3753 | markster | 2008-01-15 15:07:06 -0600 (Tue, 15 Jan 2008) | 2 lines Fix GotoIf logging level (bug ASTERISK-2364) ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=3753 |