blachlylab / dhtslib

D bindings and OOP wrappers for htslib
MIT License
7 stars 1 forks source link

Make missing index warning suppressible #16

Closed kautto closed 5 years ago

kautto commented 5 years ago
[I::dhtslib.sam.SAMFile.__ctor!(File).this] SAM index not found
[D::dhtslib.sam.SAMFile.__ctor!(File).this] SAM index: null

The message should be suppressible, since we don't always rely on the .BAI file.

jblachly commented 5 years ago

The second one is debug only and would not show in production.

I've thought a bit about this and in truth think it is not so bad to know the index is missing; you can suppress this info level message in your own code by changing hts_log_level to warning or error (you can change it back to info afterward if you'd like)