ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Set log levels in rosjava nodes

asked 2014-11-26 06:52:59 -0600

moritz gravatar image

How can I set the default log level of rosjava nodes to something below INFO?

The Apache Commons 'Log' interface does not support this, but delegates the configuration to the underlying logging mechanism. I have tried putting the usual files into the root of my catkin package or into the rosjava subprojects contained therein, but that did not have any effect. My application calls rosjava from a Prolog shell that currently gets clogged with log messages at the INFO level, so I'd be happy about any hints.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2017-07-03 04:25:30 -0600

To set the logs, create a file like this one:

# The following creates two handlers
handlers=java.util.logging.ConsoleHandler, java.util.logging.FileHandler
# Set the default logging level for the root logger
# log level for the "com.example" package
# Set the default logging level
# Set the default formatter
# Specify the location and name of the log file

later, in the execution:

java -Djava.util.logging.config.file=/home/robot/ -jar rosjava-helloworld-0.1.0-SNAPSHOT-all.jar

Juan Antonio

edit flag offensive delete link more

Question Tools


Asked: 2014-11-26 06:52:59 -0600

Seen: 277 times

Last updated: Jul 03 '17