-
Notifications
You must be signed in to change notification settings - Fork 153
[launch] provide default console and filesystem logging for executed processes #104
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
Comments
launch
] provide default console and filesystem logging for executed processes
Looking back at roslaunch from ROS 1: There are two lists of handlers for logging messages (for stdout and stderr) that are invoked every time a log function is called. Each of the "printlog" functions prints to the screen as well as logs to a file: Pythons logging module is used for writing to a log file An initial call to configure_logging sets the log file path to:
Where,
Node processes through launch are started with The format for the node process log files are:
Where,
Some other things worth noting:
Regarding ROS 2 launch, there are the following questions (with proposed answers):
Features such as log rotation, consolidation, and common logging methods (e.g. to "rosout" topic) in rcl and language client libraries can be considered separately, perhaps deserving a design document. @wjwwood Let me know your thoughts and things I've overlooked. |
From a discussion offline,
|
All standing PRs have been merged, though I cannot say #104 (comment) points are all addressed. |
I don't think the two points in #104 (comment) are addressed, but I don't think they're critical and could be captured in separate tickets. |
I think this is done. I'm not sure if there's support for stripping color escape sequences, but a separate ticket can be opened for that. |
Currently in
launch
an executed process does not have anything printed to the console and nothing is logged to a file.Some of the examples will create custom event handlers for this:
launch/launch/examples/launch_counters.py
Lines 51 to 62 in b78d87f
The "default launch description" provided by
launch_ros
also creates an event handler to cause executed processes to print to the console if configured to do so (with theoutput=
option toExecuteProcess
and it's derived classes likeNode
):launch/launch_ros/launch_ros/default_launch_description.py
Lines 49 to 65 in b78d87f
But even this doesn't handle writing process output to a log file:
launch/launch_ros/launch_ros/default_launch_description.py
Line 65 in b78d87f
Ideally, there would be some facility for this built into
launch
andlaunch_ros
could additionally configure it to write files to something likeROS_HOME
where as it might go to~/.launch_logs
(or something like that) instead. The user could further configure this default event handler if desired.The user would still be able to provide their own event handler for output from process, to be run along with the default or instead of it.
The text was updated successfully, but these errors were encountered: