ROS_ERROR not written to log file [closed]

asked 2018-07-13 00:19:00 -0500

KenYN gravatar image

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?

edit retag flag offensive reopen merge delete

Closed for the following reason duplicate question by tfoote
close date 2019-03-20 17:41:29.465937

Comments

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

jdlangs gravatar image jdlangs  ( 2019-02-14 10:02:32 -0500 )edit