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

Add flag to disable carriage return in stdout #98

Open
provokateurin opened this issue Dec 17, 2024 · 4 comments
Open

Add flag to disable carriage return in stdout #98

provokateurin opened this issue Dec 17, 2024 · 4 comments

Comments

@provokateurin
Copy link

I'm using a systemd service for ripping CDs in the background.
Unfortunately the carriage returns used to update the progress don't place nice with systemd (or any other logging system that is not a terminal I believe).
It would be great to have a flag to disable it, so that the logs are easier to read in these scenarios.

@cyanreg
Copy link
Owner

cyanreg commented Dec 18, 2024

You what?

@provokateurin
Copy link
Author

The logs are sent to the systemd-journald and end up looking like this:
image
Or when you follow them:
image

I believe this is due to a use of carriage return to update the progress.

@provokateurin
Copy link
Author

Ok maybe it's not actually a carriage return but a missing newline:

cyanrip_log(NULL, 0, "%s", line);

Does this make sense?

@q3cpma
Copy link

q3cpma commented Dec 19, 2024

You could always cyanrip ... | sed 's/.*\r//' to only keep the last "line". But yeah, isatty should be used to guard the use of this kind of gadget.

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

3 participants