rrwick / Trycycler

A tool for generating consensus long-read assemblies for bacterial genomes
GNU General Public License v3.0
306 stars 28 forks source link

Trycycler should automatically save log to file #37

Closed clf-bio closed 2 years ago

clf-bio commented 2 years ago

Although the log printed on screen by Trycycler could be manually redirected to file. It would be much better if Trycycler automatically save them to a file. Those files may be useful for debug.

rrwick commented 2 years ago

Thanks for the suggestion. I had considered this, but I found the problem ambiguous because some Trycycler steps are per-genome and other steps are per-cluster. I.e. it wasn't obvious whether everything should go in a single log file or have one per-genome log file and then separate log files for each cluster.

In the end, I decided to be lazy and leave it up to the user, who can (as you said) manually redirect Trycycler's stderr text to a file.

For reference, if you want to put the output text in a file, you can do something like this:

TRYCYCLER COMMAND 2>> log.txt

Or if you want to see the output text on the screen and put it in a file, then like this:

TRYCYCLER COMMAND 2>>(tee -a log.txt)