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

Allow output of measurement data to stdout again #16

Open
UsualSpec opened this issue Jul 27, 2024 · 0 comments
Open

Allow output of measurement data to stdout again #16

UsualSpec opened this issue Jul 27, 2024 · 0 comments

Comments

@UsualSpec
Copy link
Contributor

84c59ab introduced the -O flag which allows writing all output to a file. Now all output goes to stderr by default.
I believe that measurement outputs are not errors and should therefore - like before - still go to stdout (if the -O flag is not set).

In our project, we get data from stdout of pinpoint (ref: https://github.com/nsg-ethz/autopower/blob/cdb4c9212433088ddd614a17a9a198c33e689427/client/client.cc#L201) and reverted some changes as quick fix:
nsg-ethz@23d1aea nsg-ethz@dc8cefa

This is not ideal as it diverges from upstream, and I'd like to propose some changes to output handling:

As easy fix: allow passing stdout to the -O flag to print to stdout instead of stderr. This will then disallow writing to a file called stdout - but this can be documented.

As more involved, but potentially cleaner fix: to introduce an error output stream which - if -O is set - writes to the file together with the output_stream, else just goes to stderr, while output_stream goes to stdout.

What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant