Why must I call roslaunch.configure_logging?

asked 2017-12-20 08:12:50 -0500

Felix Widmaier gravatar image

In the roslaunch API example, the function roslaunch.configure_logging is called before creating an instance of ROSLaunchParent. The documentation says about this function only:

scripts using roslaunch MUST call configure_logging

without further explanation.

Now I have the problem, that after calling the function, I do not get anymore output generated by my script (e.g. with rospy.loginfo). When I remove the call, I get all the outputs and also the roslaunch part seems to work without problems.

So my question is: MUST I really call configure_logging. If yes, why? What are the consequences of not calling it?

edit retag flag offensive close merge delete

Comments

I assume that you're referring to this documentation (source)?

jayess gravatar image jayess  ( 2017-12-20 14:09:07 -0500 )edit

Did you try not calling it and seeing what happens?

jayess gravatar image jayess  ( 2017-12-20 14:09:54 -0500 )edit
1

@jayess: Exactly. Yes, I removed the call and everything seems to work well so far. But since the docstring is pretty strongly telling me to use it, I would like to know if there could be some problems I just did not notice yet.

Felix Widmaier gravatar image Felix Widmaier  ( 2017-12-21 02:09:36 -0500 )edit

The logging in ~/.ros/log directory appears to behave exactly the same, with/without configure_logging(). I wonder what it does...

Magnus gravatar image Magnus  ( 2020-12-02 11:52:50 -0500 )edit