Setting the debug message level

ROS supports the following logging levels (in increasing order of relevance):

  • DEBUG
  • INFO
  • WARN
  • ERROR
  • FATAL

These levels are part of the function used to output messages, so it's something you can easily experiment with, simply by using the syntax below:

ROS_<LEVEL>[_<OTHER>] 

Each message is printed with a particular color. The colors are as follows:

DEBUG in green 
INFO in white 
WARN in yellow 
ERROR in red 
FATAL in purple 

Each message level is meant to be used for a different purpose. Here, we suggest the uses for each of the levels:

  • DEBUG: Use them only when debugging; this information should not be displayed in a deployed application, as it's only for testing purposes
  • INFO: These should be standard messages to indicate significant steps or what the node is doing
  • WARN: As the name suggests, use them to provide a warning that something might be wrong, missed, or abnormal, but that the application can still
    run regardless
  • ERROR: These can be used to indicate errors, although the node can still recover from them; however, they set a certain expectation regarding the node's behavior
  • FATAL: These messages usually expose errors that prevent the node from continuing its operation
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.119.106.237