-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Force flush for rcutils logging #70
Comments
Python scripts can use |
Hello @dhood. I don't see there will be an elegant way rather than ugly hack for all languages. Maybe we can do something in shell command. However, buffering mechanism is specified by POSIX. Have anyone got any idea about that? I see the label here, and wanna try it out. |
@yenwu thanks for your interest! The objective is to remove the need for hard-coding anything to force flushing in ROS applications themselves (as you noted it changes for each language). This can be accomplished with an environment variable instead. That way, the decision to use or not use unbuffered output can be made when the process is run. The good thing is that ros/ros_comm#1012 shows how this has been accomplished in ROS 1. It would be good to copy that PR into How does that sound? |
Addressed by #98. |
We have code that forces flushing of stdout in some places, particularly so that launch file prints sync. This includes python scripts that call
sys.stdout.flush()
. After switching to use rcutils logging (via python wrappers),sys.stdout.flush()
will do nothing for python scripts, and they will not have a way to force flush.Consider an environment variable similar to ros/ros_comm#1012.
The text was updated successfully, but these errors were encountered: