Debug Output

From Yate Documentation
(Difference between revisions)
Jump to: navigation, search
(Debugging levels)
(14 intermediate revisions by 3 users not shown)
Line 1: Line 1:
== Debugging Output ==
+
Yate provides Debugging info on console.
  
=== Quick enabling debug - rmanager ===
+
The modalities to enable debug in Yate are:
 +
* from command line by adding -v options.
 +
* from telnet client ([[Rmanager]] module is required).
 +
 
 +
=== Quickly enable debug - rmanager ===
  
 
If you telnet into the rmanager interface you can enable debugging and increase the level using commands like the following:
 
If you telnet into the rmanager interface you can enable debugging and increase the level using commands like the following:
Line 17: Line 21:
 
Remember that after Yate starts you will need to enable debugging on each module individually.
 
Remember that after Yate starts you will need to enable debugging on each module individually.
  
=== Quick enabling debug - command line ===
+
=== Quickly enable debug - command line ===
  
 
The easiest way is to globally increase the visible debug level by adding '''-v''' options to the Yate command line or the service start script:
 
The easiest way is to globally increase the visible debug level by adding '''-v''' options to the Yate command line or the service start script:
  [=yate -vvvvv -l logfile -d -s -r =]
+
  yate -vvvvv -l logfile -d -s -r  
 
Each '''v''' character increases debugging by one, Five '''v''' as above gives the maximum debugging.
 
Each '''v''' character increases debugging by one, Five '''v''' as above gives the maximum debugging.
  
Line 28: Line 32:
 
* In the local console output if Yate was started interactively
 
* In the local console output if Yate was started interactively
 
* To a log file if it was specified on the command line (disables console output)
 
* To a log file if it was specified on the command line (disables console output)
* On a remote console that can be accessed with a [[http://en.wikipedia.org/wiki/Telnet|telnet]] client program (needs the [[rmanager]] module)
+
* On a remote console that can be accessed with a [http://en.wikipedia.org/wiki/Telnet telnet] client program (needs the [[rmanager]] module)
 
Optionally the output can be colorized for either type of console but not for logs.
 
Optionally the output can be colorized for either type of console but not for logs.
  
Line 34: Line 38:
 
{|class="wikitable" border="1" style="text-align: center;"
 
{|class="wikitable" border="1" style="text-align: center;"
 
!style="text-style: solid;"|Level
 
!style="text-style: solid;"|Level
|Shows
+
!style="text-style: solid;"|Shows
|Code  
+
!style="text-style: solid;"|Code  
|Description
+
!style="text-style: solid;"|Description
 
|-
 
|-
|DebugFail
+
|style="text-align: left;"|DebugFail
 
|FAIL  
 
|FAIL  
 
|0  
 
|0  
|The most severe error level, reserved for unmanageable errors. The '''-Da''' command line option allows Yate to abort immediately after displaying such an error although it would probably crash anyway.  
+
|style="text-align: left;"|The most severe error level, reserved for unmanageable errors. The '''-Da''' command line option allows Yate to abort immediately after displaying such an error although it would probably crash anyway.  
 
|-
 
|-
|DebugTest  
+
|style="text-align: left;"|DebugTest  
 
|TEST  
 
|TEST  
 
|1  
 
|1  
|Intended to be used only by programmers while debugging new code.
+
|style="text-align: left;"|Intended to be used only by programmers while debugging new code.
 
|-
 
|-
|DebugGoOn  
+
|style="text-align: left;"|DebugGoOn  
 
|GOON  
 
|GOON  
 
|2  
 
|2  
|Serious programming errors that can be fixed automatically without crashing. Further functionality will probably be affected.
+
|style="text-align: left;"|Serious programming errors that can be fixed automatically without crashing. Further functionality will probably be affected.
 
|-
 
|-
|DebugConf  
+
|style="text-align: left;"|DebugConf  
 
|CONF  
 
|CONF  
 
|3  
 
|3  
|Serious configuration error that prevents some component from starting.  
+
|style="text-align: left;"|Serious configuration error that prevents some component from starting.  
 
|-
 
|-
|DebugStub  
+
|style="text-align: left;"|DebugStub  
 
|STUB  
 
|STUB  
 
|4  
 
|4  
|Programmer's stub - the functionality is not implemented yet.
+
|style="text-align: left;"|Programmer's stub - the functionality is not implemented yet.
 
|-
 
|-
|DebugWarn  
+
|style="text-align: left;"|DebugWarn  
 
|WARN  
 
|WARN  
 
|5  
 
|5  
|Normal warning, something went wrong in a controlled way.
+
|style="text-align: left;"|Normal warning, something went wrong in a controlled way.
 
|-
 
|-
|DebugMild  
+
|style="text-align: left;"|DebugMild  
 
|MILD  
 
|MILD  
 
|6  
 
|6  
|Mild warning, something went wrong but was automatically corrected.
+
|style="text-align: left;"|Mild warning, something went wrong but was automatically corrected.
 
|-
 
|-
|DebugCall  
+
|style="text-align: left;"|DebugCall  
 
|CALL  
 
|CALL  
 
|7  
 
|7  
|Call related information, nothing wrong.  
+
|style="text-align: left;"|Call related information, nothing wrong.  
 
|-
 
|-
|DebugNote  
+
|style="text-align: left;"|DebugNote  
 
|NOTE  
 
|NOTE  
 
|8  
 
|8  
|Less important note regarding normal operation.
+
|style="text-align: left;"|Less important note regarding normal operation.
 
|-
 
|-
|DebugInfo
+
|style="text-align: left;"|DebugInfo
 
|INFO  
 
|INFO  
 
|9  
 
|9  
|Informative message including some protocol details.
+
|style="text-align: left;"|Informative message including some protocol details.
 
|-
 
|-
|DebugAll   
+
|style="text-align: left;"|DebugAll   
 
|ALL   
 
|ALL   
 
|10  
 
|10  
|Highest trace level detailing even code progress.
+
|style="text-align: left;"|Highest trace level detailing even code progress.
 
|}
 
|}
  
Line 109: Line 113:
 
If a threshold is set for a rmanager connection if will filter out only debugging on that specific connection. Other active messages will still be displayed on console or logged to file.
 
If a threshold is set for a rmanager connection if will filter out only debugging on that specific connection. Other active messages will still be displayed on console or logged to file.
  
Initial visibility levels can be set from the Yate [[Starting|command line]] or from the [[ConfigurationFiles|main configuration file]]. At runtime the debug levels can be changed by [[rmanager commands]] and they will persist until the server process is restarted.
+
Initial visibility levels can be set from the Yate [[Starting Yate|command line]] or from the [[Configuration Files|main configuration file]]. At runtime the debug levels can be changed by [[rmanager|rmanager commands]] and they will persist until the server process is restarted.
  
 
=== Limits ===
 
=== Limits ===
Line 121: Line 125:
 
Suppose Yate is started with '''-vv''' and in ''yate.conf'' we have:
 
Suppose Yate is started with '''-vv''' and in ''yate.conf'' we have:
 
   
 
   
{|
 
|
 
 
  [debug]
 
  [debug]
 
  sip=level 9
 
  sip=level 9
|}
 
  
 
The engine, libraries and all modules will start at level 7 (DebugCall) except the SIP module which will start on level 9 (DebugInfo)
 
The engine, libraries and all modules will start at level 7 (DebugCall) except the SIP module which will start on level 9 (DebugInfo)
Line 138: Line 139:
 
  debug threshold 6
 
  debug threshold 6
 
Now the local connection will show only messages of level 6 (DebugMild) or more important although all enabled levels will still be written to logs and other telnet connections.
 
Now the local connection will show only messages of level 6 (DebugMild) or more important although all enabled levels will still be written to logs and other telnet connections.
 +
 +
 +
'''See also'''
 +
 +
* [[Starting Yate]]
 +
* [[Configuration Files]]
 +
* [[Rmanager]]
 +
* [[How To's]]
 +
 +
[[Category:Telnet]] [[Category:Rmanager]] [[Category:Debug]] [[Category:Debug level]]

Revision as of 17:55, 31 October 2013

Yate provides Debugging info on console.

The modalities to enable debug in Yate are:

  • from command line by adding -v options.
  • from telnet client (Rmanager module is required).

Contents

Quickly enable debug - rmanager

If you telnet into the rmanager interface you can enable debugging and increase the level using commands like the following:

$ telnet localhost 5038
Trying 127.0.0.1...
Connected to localhost (127.0.0.1).
Escape character is '^]'.
Yate 4.1.1 (http://YATE.null.ro) ready on localhost.
debug on
debug level 10
debug sip level 10
color on

Remember that after Yate starts you will need to enable debugging on each module individually.

Quickly enable debug - command line

The easiest way is to globally increase the visible debug level by adding -v options to the Yate command line or the service start script:

yate -vvvvv -l logfile -d -s -r 

Each v character increases debugging by one, Five v as above gives the maximum debugging.

Output

Debug information can be displayed in several places:

  • In the local console output if Yate was started interactively
  • To a log file if it was specified on the command line (disables console output)
  • On a remote console that can be accessed with a telnet client program (needs the rmanager module)

Optionally the output can be colorized for either type of console but not for logs.

Debugging levels

Level Shows Code Description
DebugFail FAIL 0 The most severe error level, reserved for unmanageable errors. The -Da command line option allows Yate to abort immediately after displaying such an error although it would probably crash anyway.
DebugTest TEST 1 Intended to be used only by programmers while debugging new code.
DebugGoOn GOON 2 Serious programming errors that can be fixed automatically without crashing. Further functionality will probably be affected.
DebugConf CONF 3 Serious configuration error that prevents some component from starting.
DebugStub STUB 4 Programmer's stub - the functionality is not implemented yet.
DebugWarn WARN 5 Normal warning, something went wrong in a controlled way.
DebugMild MILD 6 Mild warning, something went wrong but was automatically corrected.
DebugCall CALL 7 Call related information, nothing wrong.
DebugNote NOTE 8 Less important note regarding normal operation.
DebugInfo INFO 9 Informative message including some protocol details.
DebugAll ALL 10 Highest trace level detailing even code progress.

Note that the most important debugging messages have numerically lower levels.

Visibility

To avoid cluttering the logs and terminal output with unimportant messages it is possible to only display messages with a level numerically lower (that is, more important) than a specific limit:

  • debugging can be turned on / off for the engine
  • debugging can be turned on / off for individual modules or components
  • a limit can be set for the engine
  • a limit can be set for individual modules or components
  • a threshold can be specified for a rmanager connection.

If a limit is set per engine or module or component messages less important (having a numerically higher level) will not be displayed in either output and will not slow down processing.

If a threshold is set for a rmanager connection if will filter out only debugging on that specific connection. Other active messages will still be displayed on console or logged to file.

Initial visibility levels can be set from the Yate command line or from the main configuration file. At runtime the debug levels can be changed by rmanager commands and they will persist until the server process is restarted.

Limits

To make sure you see the important messages the lowest display level is limited to DebugConf for engine, modules or rmanager thresholds.

IMPORTANT: Even if the minimim debug level is limited the debugging can still be turned off entirely.

Example

Suppose Yate is started with -vv and in yate.conf we have:

[debug]
sip=level 9

The engine, libraries and all modules will start at level 7 (DebugCall) except the SIP module which will start on level 9 (DebugInfo)

$ telnet localhost 5038
debug on
color on
debug sip level 10
debug yrtp level 10

This will enable colorful debugging on the connection you are on and then increase debugging level to 10 (maximum) for the SIP and RTP modules.

debug threshold 6

Now the local connection will show only messages of level 6 (DebugMild) or more important although all enabled levels will still be written to logs and other telnet connections.


See also

Personal tools
Namespaces

Variants
Actions
Preface
Configuration
Administrators
Developers