Skip to content
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

roslaunch option to log to both: screen and logfile #418

Closed
wants to merge 4 commits into from

Conversation

eggerdo
Copy link

@eggerdo eggerdo commented May 27, 2014

Replaces PR #413

For output = both
-> stdout will be written to screen and logfileout
-> stderr will be redirected to stdout, this will keep temporal order between out and err intact on screen and log file, but err messages will be written with out messages to logfileout.
-> no stderr log file

For output = log
-> stdout will be written to logfileout
-> stderr will be written to screen and logfileerr
-> temporal order not intact, but doesn't matter because files are separated and only err messages are shown on screen

For output = screen
-> stays as is, no multiplexing is needed

Dominik added 2 commits May 27, 2014 11:43
…creen and file. it uses subprocess.pipe and threading. Includes corrections from PR ros#413
@ros-pull-request-builder
Copy link
Member

Can one of the admins verify this patch?

@@ -434,7 +434,7 @@ def __init__(self, package, node_type, name=None, namespace='/', \
:param remap_args: list of [(from, to)] remapping arguments, ``[(str, str)]``
:param env_args: list of [(key, value)] of
additional environment vars to set for node, ``[(str, str)]``
:param output: where to log output to, either Node, 'screen' or 'log', ``str``
:param output: where to log output to, 'screen', 'log' or both, ``str``
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'both' should be quoted as the other two options.

@wjwwood
Copy link
Member

wjwwood commented May 31, 2014

@bchretien
Copy link

It would also be nice to have a "none" option, i.e. do not log anything. There are cases where errors are expected and handled, so filling the disk with irrelevant logs and/or spamming the console can be a nuisance. Or is that already possible some other way? If not, it would be really easy to add to this PR apparently (add a check for self.screen_output here and change the assigments there).

adrienbarral pushed a commit to adrienbarral/ros_comm that referenced this pull request Jan 16, 2015
…he PR ros#418 submitted by eggerdo.

Now, if "output" attribute is "both", a file will be created, and output will be displayed on screen. Created file can be a Rotating file thanks to the previous commit.
IanTheEngineer pushed a commit to RethinkRobotics-opensource/ros_comm that referenced this pull request May 25, 2016
…he PR ros#418 submitted by eggerdo.

Now, if "output" attribute is "both", a file will be created, and output will be displayed on screen. Created file can be a Rotating file thanks to the previous commit.
IanTheEngineer pushed a commit to RethinkRobotics-opensource/ros_comm that referenced this pull request Jul 7, 2016
…he PR ros#418 submitted by eggerdo.

Now, if "output" attribute is "both", a file will be created, and output will be displayed on screen. Created file can be a Rotating file thanks to the previous commit.
IanTheEngineer pushed a commit to RethinkRobotics-opensource/ros_comm that referenced this pull request Jul 7, 2016
…he PR ros#418 submitted by eggerdo.

Now, if "output" attribute is "both", a file will be created, and output will be displayed on screen. Created file can be a Rotating file thanks to the previous commit.
@dirk-thomas
Copy link
Member

I will close this as a duplicate of #551 since that PR contains an update variation of this patch.

@dirk-thomas dirk-thomas closed this Aug 8, 2016
asmodehn pushed a commit to asmodehn/ros_comm that referenced this pull request Apr 28, 2017
…he PR ros#418 submitted by eggerdo.

Now, if "output" attribute is "both", a file will be created, and output will be displayed on screen. Created file can be a Rotating file thanks to the previous commit.
asmodehn pushed a commit to asmodehn/ros_comm that referenced this pull request May 2, 2017
…he PR ros#418 submitted by eggerdo.

Now, if "output" attribute is "both", a file will be created, and output will be displayed on screen. Created file can be a Rotating file thanks to the previous commit.
asmodehn pushed a commit to asmodehn/ros_comm that referenced this pull request May 23, 2017
…he PR ros#418 submitted by eggerdo.

Now, if "output" attribute is "both", a file will be created, and output will be displayed on screen. Created file can be a Rotating file thanks to the previous commit.
IanTheEngineer pushed a commit to RethinkRobotics-opensource/ros_comm that referenced this pull request Jan 19, 2018
…he PR ros#418 submitted by eggerdo.

Now, if "output" attribute is "both", a file will be created, and output will be displayed on screen. Created file can be a Rotating file thanks to the previous commit.
IanTheEngineer pushed a commit to RethinkRobotics-opensource/ros_comm that referenced this pull request Feb 26, 2018
…he PR ros#418 submitted by eggerdo.

Now, if "output" attribute is "both", a file will be created, and output will be displayed on screen. Created file can be a Rotating file thanks to the previous commit.
IanTheEngineer pushed a commit to RethinkRobotics-opensource/ros_comm that referenced this pull request Jul 27, 2018
…he PR ros#418 submitted by eggerdo.

Now, if "output" attribute is "both", a file will be created, and output will be displayed on screen. Created file can be a Rotating file thanks to the previous commit.

(cherry picked from commit c3abda4)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants