Skip to content

Instantly share code, notes, and snippets.

@TheProjectsGuy
Created December 12, 2018 12:41
Show Gist options
  • Select an option

  • Save TheProjectsGuy/b5317b12bd6d1ea58322d02861b6c072 to your computer and use it in GitHub Desktop.

Select an option

Save TheProjectsGuy/b5317b12bd6d1ea58322d02861b6c072 to your computer and use it in GitHub Desktop.
Configuration files to change the debugger priority level in ROS using rosout for Python and roscpp for C++
# Override the rosconsole logger
# output level for this package ONLY
log4j.logger.ros.intro_pkg1=DEBUG
[loggers]
keys=root, rosout
[handlers]
keys=fileHandler,streamHandler
[formatters]
keys=defaultFormatter
[logger_root]
level=INFO
handlers=fileHandler
[logger_rosout]
level=DEBUG
handlers=streamHandler
propagate=1
qualname=rosout
[handler_fileHandler]
class=handlers.RotatingFileHandler
level=DEBUG
formatter=defaultFormatter
# log filename, mode, maxBytes, backupCount
args=(os.environ['ROS_LOG_FILENAME'],'a', 50000000, 4)
[handler_streamHandler]
class=rosgraph.roslogging.RosStreamHandler
level=DEBUG
formatter=defaultFormatter
# colorize output flag
args=(True,)
[formatter_defaultFormatter]
format=[%(name)s][%(levelname)s] %(asctime)s: %(message)s
@TheProjectsGuy
Copy link
Copy Markdown
Author

Actual contents of the ROS C++ logger file:

#
#   rosconsole will find this file by default at $ROS_ROOT/config/rosconsole.config
#
#   You can define your own by e.g. copying this file and setting
#   ROSCONSOLE_CONFIG_FILE (in your environment) to point to the new file
#
log4j.logger.ros=INFO
log4j.logger.ros.roscpp.superdebug=WARN

You're suggested to make it

#
#   rosconsole will find this file by default at $ROS_ROOT/config/rosconsole.config
#
#   You can define your own by e.g. copying this file and setting
#   ROSCONSOLE_CONFIG_FILE (in your environment) to point to the new file
#
log4j.logger.ros=INFO
log4j.logger.ros.intro_pkg1=DEBUG

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment