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

Revision history [back]

click to hide/show revision 1
initial version

Hi Sebastian!

You can access the logger like this:

log4cxx::LoggerPtr my_logger = log4cxx::Logger::getLogger(ROSCONSOLE_DEFAULT_NAME);
my_logger->getLevel();
my_logger->setLevel(ros::console::g_level_lookup[ros::console::levels::Debug]);

Hi Sebastian!

You can access the logger like this:

log4cxx::LoggerPtr my_logger = log4cxx::Logger::getLogger(ROSCONSOLE_DEFAULT_NAME);
my_logger->getLevel();
my_logger->setLevel(ros::console::g_level_lookup[ros::console::levels::Debug]);

You then also have to link against the log4cxx library:

find_library(LOG4CXX_LIBRARY log4cxx)
target_link_libraries(some_target ${LOG4CXX_LIBRARY})