Creating nodes: Messages | Publishers and subscribers | Services | Parameters | Logging | Exceptions | Running nodes | Building your package with Ant and rosmake | manifest.xml | ros.properties | Developing your project in Eclipse | Integrating test results from JUnit | rosjava-related packages

The logging interface for rosjava is achieved through the the Node objects getLog method. This object returns an Apache Commons Log object which handles the debug, info, error, warning, and fatal logging outputs for ros.

node.getLog.debug("debug message");
node.getLog.info(" informative message");

node.getLog.warn("warning message");

//report an error message
node.getLog.error("error message");

//error message with an exception 
//so that it can print the stack trace
node.getLog.error("error message", e);

node.fatal("message informing user of a fatal occurrence");

Wiki: rosjava/Overview/Logging (last edited 2011-08-15 04:34:26 by AdamStambler)