Log viewer ¶
What is the Log viewer ¶
The Log viewer enables you to debug your behavior by displaying messages coming from running Behaviors.
Any message displayed includes:
A message with a debug severity level also contains the corresponding line number in the box script which is in brackets and then the name of the concerned method in the box script.
Severity level ¶
Each message can have a different level of severity which are displayed with different prefixes and in different colors :
|debug||This is generally used to debug a very specific point in the behavior.|
|verbose||These logs generally describe what is happening in the behavior step by step.|
|info||These logs are generally not essential but can be useful for someone else who would use your behavior.|
|warning||This is generally used to warn you about an important fact which does not threaten the smooth running of the behavior.|
This is used for errors which does threaten the smooth running of the behavior.
When an error is raised in a box, the specific box and all its parents get red in order to find the cause of the problem more easily.
|fatal||This is not very used but you can use it for example for errors which surely make the behavior crash.|
Path of the box ¶
The path of the box is contained in a string which looks like the following:
<behavior-id>corresponds to the identification number of the behavior (which enables you to determine which behavior does the message come from).
<box-path>corresponds to the path of the box which the message comes from.
For example a box named
Childis in the diagram of a box named
Parentis in the main diagram. The path of
Childshould look like
The numbers in the path enables to identify boxes that have the same name so that the path is unique for each box.
Defining which events are logged ¶
By default, this panel displays only messages caused by running behaviors with info as a minimal level of severity. But you can even get all messages from NAOqi and NAOqi’s modules, and get messages from lower level of severity.
- To get all messages from NAOqi and NAOqi’s modules: check the checkbox Show all logs .
- To adjust the level of severity : use Log Level drop-list.
For example, if Error is selected as Log Level, messages displayed in the panel will be only the ones defined as fatal or error . In the same way, if Debug is selected, messages of any level will be displayed.
Selecting a very low level will result in having a lot of messages, possibly reducing the speed of the whole application.
You should know that you can send messages yourself from the scripts of your own boxes . For more information, see the section: Built-in functions in the script of a box .
Editing log list ¶
If you right-click in the Debug window, the following menu is displayed: