najoshi / sickle

Windowed Adaptive Trimming for fastq files using quality
MIT License
217 stars 95 forks source link

Use stderr for all logging messages #43

Open kdm9 opened 9 years ago

kdm9 commented 9 years ago

Hi Nik,

We have been using sickle in a UNIX pipeline, and in some cases sickle prints logging or summary information to stdout, which ends up in with the fastq records. This PR simply changes all logging or debugging statements outside of --help and --version to use stderr, not stdout.

najoshi commented 9 years ago

Hi Kevin,

I purposely put summary information on stdout, because stderr should only be used for diagnostic and error messages. You can use the --quiet option to suppress the summary output, which should allow it to work in your pipeline.

On Mon, Jul 13, 2015 at 9:48 PM, Kevin Murray notifications@github.com wrote:

Hi Nik,

We have been using sickle in a UNIX pipeline, and in some cases sickle prints logging or summary information to stdout, which ends up in with the fastq records. This PR simply changes all logging or debugging statements

outside of --help and --version to use stderr, not stdout.

You can view, comment on, or merge this pull request online at:

https://github.com/najoshi/sickle/pull/43 Commit Summary

  • Use stderr for all logging messages

File Changes

Patch Links:

— Reply to this email directly or view it on GitHub https://github.com/najoshi/sickle/pull/43.

Nikhil Joshi Bioinformatics Analyst/Programmer UC Davis Bioinformatics Core http://bioinformatics.ucdavis.edu/ najoshi -at- ucdavis -dot- edu 530.752.2698 (w)

kdm9 commented 9 years ago

OK Nik, fair enough. The reason for using stderr is that we would like the information which sickle provides. Would you be interested in a CLI flag which activates stderr logging? Or even logic which automatically redirects all logging to stderr if the output filename(s) are -?