vt icon indicating copy to clipboard operation
vt copied to clipboard

Optional log file

Open AlistairNWard opened this issue 8 years ago • 8 comments

Would it be possible to (optionally) output all log information to a defined file? We currently catch everything going to stderr and process to identify potential errors in our pipeline. Current implementation means we always have content in stderr and it is almost never an error. What would be great would be a --log option for all vt tools, so that log information goes to that file, errors go to stderr and the vcf/bcf goes to stdout.

AlistairNWard avatar Aug 05 '16 14:08 AlistairNWard

Would it make sense that the --log have an accompanying specified log file name?

Similar to plink's system of specifying the log file thought the --out option. Except in this case, the default is std::cerr rather than plink.log.

atks avatar Aug 05 '16 14:08 atks

Yes, what I should have written was --log in the original text. If this isn't supplied, behaviour would be as it is now, but if it is, it keeps that information separate and cleans up the stderr.

AlistairNWard avatar Aug 05 '16 14:08 AlistairNWard

ok. I'll keep this in mind. Implementation will come hopefully before the end of the year as I don't have the bandwidth to add this now.

atks avatar Aug 05 '16 14:08 atks

Thanks Adrian, just let me know when you get to it. It's pretty important for us, so we'll want to adopt it as soon as available.

Also, apologies, github was removing some of the text I put in. I meant --log [file], but was using angled brackets, and so the file bit kept getting removed!!

AlistairNWard avatar Aug 05 '16 15:08 AlistairNWard

Can you let me know which tools do you use in vt? I should be able to implement for those few first.

atks avatar Aug 05 '16 16:08 atks

We use normalize, subset and filter most.

AlistairNWard avatar Aug 05 '16 16:08 AlistairNWard

This will take a while, my code structure is such that it is terrible for systematic logging. I need to think through the changes. I'll aim to complete this before the end of the year. Sorry.

atks avatar Aug 07 '16 01:08 atks

That's ok, Adrian. I didn't post the comment with the expectation that you'd immediately jump on it!

AlistairNWard avatar Aug 08 '16 12:08 AlistairNWard