Debug Output

From Yate Documentation
(Difference between revisions)
Jump to: navigation, search
(Example)
(Debugging levels)
 
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
Yate provides Debugging info on console. The modalities to enable debug in Yate are:
+
Yate provides Debugging info on console.  
 +
 
 +
The modalities to enable debug in Yate are:
 
* from command line by adding -v options.
 
* from command line by adding -v options.
 
* from telnet client ([[Rmanager]] module is required).
 
* from telnet client ([[Rmanager]] module is required).
  
=== Quick enabling debug - rmanager ===
+
=== 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 19: 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:
Line 74: Line 76:
 
|6  
 
|6  
 
|style="text-align: left;"|Mild warning, something went wrong but was automatically corrected.
 
|style="text-align: left;"|Mild warning, something went wrong but was automatically corrected.
|-
 
|style="text-align: left;"|DebugCall
 
|CALL
 
|7
 
|style="text-align: left;"|Call related information, nothing wrong.
 
 
|-
 
|-
 
|style="text-align: left;"|DebugNote  
 
|style="text-align: left;"|DebugNote  
 
|NOTE  
 
|NOTE  
 +
|7
 +
|style="text-align: left;"|Note related information, nothing wrong.
 +
|-
 +
|style="text-align: left;"|DebugCall
 +
|CALL
 
|8  
 
|8  
|style="text-align: left;"|Less important note regarding normal operation.
+
|style="text-align: left;"|Less important info regarding normal operation.
 
|-
 
|-
 
|style="text-align: left;"|DebugInfo
 
|style="text-align: left;"|DebugInfo
Line 141: Line 143:
 
'''See also'''
 
'''See also'''
  
* [[Rmanager]]
 
 
* [[Starting Yate]]
 
* [[Starting Yate]]
 
* [[Configuration Files]]
 
* [[Configuration Files]]
 +
* [[Rmanager]]
 +
* [[How To's]]
 +
 +
[[Category:Telnet]] [[Category:Rmanager]] [[Category:Debug]] [[Category:Debug level]]

Latest revision as of 16:08, 16 August 2023

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

[edit] 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.

[edit] 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.

[edit] 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.

[edit] 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.
DebugNote NOTE 7 Note related information, nothing wrong.
DebugCall CALL 8 Less important info 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.

[edit] 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.

[edit] 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.

[edit] 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