<html>
<head>
<base href="https://wiki.asterisk.org/wiki">
<link rel="stylesheet" href="/wiki/s/2029/1/7/_/styles/combined.css?spaceKey=AST&forWysiwyg=true" type="text/css">
</head>
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
<h2><a href="https://wiki.asterisk.org/wiki/display/AST/Collecting+Debug+Information">Collecting Debug Information</a></h2>
<h4>Page <b>edited</b> by <a href="https://wiki.asterisk.org/wiki/display/~pabelanger">Paul Belanger</a>
</h4>
<br/>
<h4>Changes (9)</h4>
<div id="page-diffs">
<table class="diff" cellpadding="0" cellspacing="0">
<tr><td class="diff-unchanged" >h1. Collecting Debug Information for the Asterisk Issue Tracker <br> <br></td></tr>
<tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">Written by: Paul Belanger <br>Last updated: 2010-04-12 <br> <br></td></tr>
<tr><td class="diff-unchanged" >This document will provide instructions on how to collect debugging logs from an Asterisk machine, for the purpose of helping bug marshals troubleshoot an issue on [https://issues.asterisk.org] <br> <br></td></tr>
<tr><td class="diff-snipped" >...<br></td></tr>
<tr><td class="diff-unchanged" >*1.* Edit the logger.conf file to enable debug output to your filesystem. Add the following line. The word "myDebugLog" can be changed to anything you want, as that is the filename the logging will be written to. A good example might be something like: issue_12345_full_log <br> <br></td></tr>
<tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">{code}myDebugLog => notice,warning,error,debug,verbose,dtmf{code} <br></td></tr>
<tr><td class="diff-added-lines" style="background-color: #dfd;">{code:title=logger.conf|borderStyle=solid} <br>[logfiles] <br>myDebugLog => notice,warning,error,debug,verbose,dtmf <br>{code} <br></td></tr>
<tr><td class="diff-unchanged" > <br>*2.* From the Asterisk CLI, restart the logger module: <br></td></tr>
<tr><td class="diff-snipped" >...<br></td></tr>
<tr><td class="diff-unchanged" >*5.* Upload the file located in /var/log/asterisk/myDebugLog to the issue tracker. <br> <br></td></tr>
<tr><td class="diff-changed-lines" ><span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">*IMPORTANT*</span> <span class="diff-added-words"style="background-color: #dfd;">{tip:title=Important}</span> <br></td></tr>
<tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;"> <br></td></tr>
<tr><td class="diff-unchanged" >Do *NOT* post the output of your file as a comment. This clutters the issue and will only result in your comment being deleted. <br></td></tr>
<tr><td class="diff-added-lines" style="background-color: #dfd;">{tip} <br></td></tr>
<tr><td class="diff-unchanged" > <br>*6.* Disable logging to the filesystem. Edit the logger.conf file and comment out or delete the line you added in step 1. Using a semi-colon as the first character on the line will comment out the line. <br> <br></td></tr>
<tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">Then reload the logger module like in step 2: <br></td></tr>
<tr><td class="diff-added-lines" style="background-color: #dfd;">{code:title=logger.conf|borderStyle=solid} <br>[logfiles] <br>;myDebugLog => notice,warning,error,debug,verbose,dtmf <br>{code} <br></td></tr>
<tr><td class="diff-unchanged" > <br></td></tr>
<tr><td class="diff-added-lines" style="background-color: #dfd;">Then reload the logger module like in step 2: <br></td></tr>
<tr><td class="diff-unchanged" >{code} <br>*CLI> module reload logger <br></td></tr>
<tr><td class="diff-snipped" >...<br></td></tr>
</table>
</div> <h4>Full Content</h4>
<div class="notificationGreySide">
<h1><a name="CollectingDebugInformation-CollectingDebugInformationfortheAsteriskIssueTracker"></a>Collecting Debug Information for the Asterisk Issue Tracker</h1>
<p>This document will provide instructions on how to collect debugging logs from an Asterisk machine, for the purpose of helping bug marshals troubleshoot an issue on <a href="https://issues.asterisk.org" class="external-link" rel="nofollow">https://issues.asterisk.org</a></p>
<h4><a name="CollectingDebugInformation-PREREQUISITES"></a>PREREQUISITES</h4>
<ul class="alternate" type="square">
        <li>Asterisk 1.4.30 or greater.</li>
</ul>
<h4><a name="CollectingDebugInformation-STEPS"></a>STEPS</h4>
<p><b>1.</b> Edit the logger.conf file to enable debug output to your filesystem. Add the following line. The word "myDebugLog" can be changed to anything you want, as that is the filename the logging will be written to. A good example might be something like: issue_12345_full_log</p>
<div class="code panel" style="border-style: solid;border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;border-bottom-style: solid;"><b>logger.conf</b></div><div class="codeContent panelContent">
<script type="syntaxhighlighter" class="toolbar: false; theme: Confluence; brush: java; gutter: false"><![CDATA[
[logfiles]
myDebugLog => notice,warning,error,debug,verbose,dtmf
]]></script>
</div></div>
<p><b>2.</b> From the Asterisk CLI, restart the logger module:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<script type="syntaxhighlighter" class="toolbar: false; theme: Confluence; brush: java; gutter: false"><![CDATA[
*CLI> core set verbose 15
*CLI> core set debug 15
*CLI> module reload logger
]]></script>
</div></div>
<p>Optionally, if you've used this file to record data previously, then rotate the logs:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<script type="syntaxhighlighter" class="toolbar: false; theme: Confluence; brush: java; gutter: false"><![CDATA[
*CLI> logger rotate
]]></script>
</div></div>
<p><b>2.1.</b> Depending on your issue, be sure to enable the channel driver logging.</p>
<p>SIP (1.6.0 or higher)</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<script type="syntaxhighlighter" class="toolbar: false; theme: Confluence; brush: java; gutter: false"><![CDATA[
*CLI> sip set debug on
]]></script>
</div></div>
<p>SIP (1.4)</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<script type="syntaxhighlighter" class="toolbar: false; theme: Confluence; brush: java; gutter: false"><![CDATA[
*CLI> sip set debug
]]></script>
</div></div>
<p>IAX2 (1.6.0 or higher)</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<script type="syntaxhighlighter" class="toolbar: false; theme: Confluence; brush: java; gutter: false"><![CDATA[
*CLI> iax2 set debug on
]]></script>
</div></div>
<p>IAX2 (1.4)</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<script type="syntaxhighlighter" class="toolbar: false; theme: Confluence; brush: java; gutter: false"><![CDATA[
*CLI> iax2 set debug
]]></script>
</div></div>
<p><b>3.</b> Reproduce your issue.</p>
<p><b>4.</b> Once finished, be sure to disable the extra debugging:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<script type="syntaxhighlighter" class="toolbar: false; theme: Confluence; brush: java; gutter: false"><![CDATA[
*CLI> core set verbose 0
*CLI> core set debug 0
]]></script>
</div></div>
<p><b>4.1.</b> Again, remember to disable any extra logging if you enabled it in the<br/>
channel driver.</p>
<p>SIP (1.4 or higher)</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<script type="syntaxhighlighter" class="toolbar: false; theme: Confluence; brush: java; gutter: false"><![CDATA[
*CLI> sip set debug off
]]></script>
</div></div>
<p>IAX2 (1.4 or higher)</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<script type="syntaxhighlighter" class="toolbar: false; theme: Confluence; brush: java; gutter: false"><![CDATA[
*CLI> iax2 set debug off
]]></script>
</div></div>
<p><b>5.</b> Upload the file located in /var/log/asterisk/myDebugLog to the issue tracker.</p>
<div class='panelMacro'><table class='tipMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="/wiki/images/icons/emoticons/check.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td><b>Important</b><br />Do <b>NOT</b> post the output of your file as a comment. This clutters the issue and will only result in your comment being deleted.</td></tr></table></div>
<p><b>6.</b> Disable logging to the filesystem. Edit the logger.conf file and comment out or delete the line you added in step 1. Using a semi-colon as the first character on the line will comment out the line.</p>
<div class="code panel" style="border-style: solid;border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;border-bottom-style: solid;"><b>logger.conf</b></div><div class="codeContent panelContent">
<script type="syntaxhighlighter" class="toolbar: false; theme: Confluence; brush: java; gutter: false"><![CDATA[
[logfiles]
;myDebugLog => notice,warning,error,debug,verbose,dtmf
]]></script>
</div></div>
<p>Then reload the logger module like in step 2:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<script type="syntaxhighlighter" class="toolbar: false; theme: Confluence; brush: java; gutter: false"><![CDATA[
*CLI> module reload logger
]]></script>
</div></div>
</div>
<div id="commentsSection" class="wiki-content pageSection">
<div style="float: right;">
<a href="https://wiki.asterisk.org/wiki/users/viewnotifications.action" class="grey">Change Notification Preferences</a>
</div>
<a href="https://wiki.asterisk.org/wiki/display/AST/Collecting+Debug+Information">View Online</a>
|
<a href="https://wiki.asterisk.org/wiki/pages/diffpagesbyversion.action?pageId=4259941&revisedVersion=3&originalVersion=2">View Changes</a>
|
<a href="https://wiki.asterisk.org/wiki/display/AST/Collecting+Debug+Information?showComments=true&showCommentArea=true#addcomment">Add Comment</a>
</div>
</div>
</div>
</div>
</div>
</body>
</html>