Robotics StackExchange | Archived questions

ROS_ERROR not written to log file

I have a nodelet, and for the sake of testing have code like this:

void MyClass::my_callback(...)
{
    try {
        throw std::exception();
    } catch (const std::exception &ex) {
        ROS_INFO("Info message");
        ROS_WARN("Warn message");
        ROS_ERROR("Error message");
    }
}

On stderr I can see the [ERROR] message, and looking inside manager-stdout.log I can see the [INFO] and [WARN]. However, the nodelet-stdout.log only contains system startup messages. Of course, rosout.log contains all three, but with lots of noise like ERROR [/path/to/nodelet.cpp:987(MyClass::my_callback) [topics: /rosout, /etc, /etc] Error message.

How do I either get the ROS_ERROR text into manager-stdout.log or all the logging into nodelet-stdout.log?

Asked by KenYN on 2018-07-13 00:19:00 UTC

Comments

@KenYN, I just asked a question with similar confusions. Did you ever figure out how to change this behavior?

Asked by jdlangs on 2019-02-14 11:02:32 UTC

Answers