ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
Just one addition to Clemens' post: If you want to access a custom logger, you have to remove the "log4j.logger" part. The following is doing exactly what I want:
log4cxx::LoggerPtr logger = log4cxx::Logger::getLogger("ros.my_package");
if (logger && logger->getLevel() == log4cxx::Level::getDebug()) {
// debugging code
}
2 | No.2 Revision |
Thanks Clemens, that works!
Just one addition to Clemens' post: If you want to access a custom logger, you have to remove the "log4j.logger" part. The following is doing exactly what I want:
log4cxx::LoggerPtr logger = log4cxx::Logger::getLogger("ros.my_package");
if (logger && logger->getLevel() == log4cxx::Level::getDebug()) {
// debugging code
}