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

log.error and error does not print to sderr #5942

Open
maxulysse opened this issue Apr 3, 2025 · 0 comments
Open

log.error and error does not print to sderr #5942

maxulysse opened this issue Apr 3, 2025 · 0 comments

Comments

@maxulysse
Copy link
Contributor

New feature

I would love an easy way to print to stderr.
log.error print to stdout, but prints in red with the ERROR keyword before.
I understand that it's for logging purpose first, but I would love for an easy way print to stderr in Nextflow .
While we're at it, if we could use the same method to print similar messages in the plugins that would be perfection.
If I look at this for example: https://github.com/nextflow-io/nf-schema/blob/ecf159f53d45200ef70920c03e75077b5689a386/plugins/nf-schema/src/main/nextflow/validation/ValidationExtension.groovy#L319-L323
the log.error is printed to stdout while the other message is indeed printed to both stdout and stderr.

Use case

I would want to be able to print my error message from the pipeline side, error and exit right away without catching other unrelated errors.

Suggested implementation

I think the error method should the right way to do it, if it was printing to stderr.
Still I did notice some unrelated messages that appears and throws some red herrings that confuses users (and me too)

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