[Biojava-dev] How are we supposed to log errors?

Jose Manuel Duarte jose.duarte at psi.ch
Mon May 26 08:15:00 UTC 2014


I would definitely vote for logging. As Paolo says logging is indeed 
already used in some parts of the code, so I'd say it makes sense to try 
homegenising it a bit and doing everything through the loggers. For 
instance the printing of stack traces should not be happening in my 
opinion, or at least it should only occur in debug level. Related to 
this I think exception handling needs improvement in some places (see 
issue #111 in github), I already did some commits related to that.

Cheers

Jose



On 26/05/14 08:21, Paolo Bizzarri wrote:
> Hi Andreas,
>
> it depends on the use case of biojava, I think - something that I don't
> know very well at the moment.
>
> If biojava is going to be used for short running processes with a limited
> output, you can clearly rely on the standard error for logging errors and
> exceptions.
>
> On the other side, if your process is a long running one, potentially
> producing lots of output, you do not want to miss any error just because
> things scroll up, or because you forgot to redirect your standard error to
> a file.
>
> I could provide a patch some of the System.out invocations to a logger, so
> that we can see how the code will work.
>
> What do you think?
>
> Regards.
>
> Paolo
>
>
>
>
> On Mon, May 26, 2014 at 7:17 AM, Andreas Prlic <andreas at sdsc.edu> wrote:
>
>> Hi Paolo,
>>
>> We don't have strict standards how to log throughout the code base. The
>> topic has come up on and off, but so far we have not agreed on any
>> convention.
>>
>> Andreas
>>
>>
>>
>>
>>
>>
>>
>> On Sun, May 25, 2014 at 12:43 AM, Paolo Bizzarri <pibizza at gmail.com>wrote:
>>
>>> Hi,
>>>
>>> I am looking at the code inside
>>> org.biojava.bio.structure.align.util.AtomCache.
>>>
>>> I see that many times the code prints the stack trace on the standard
>>> error.
>>>
>>> I understand that in other parts of the code we use to a standard logger
>>> instead.
>>>
>>> Which of the two is the expected approach?
>>>
>>> Regards.
>>>
>>> Paolo
>>> _______________________________________________
>>> biojava-dev mailing list
>>> biojava-dev at lists.open-bio.org
>>> http://lists.open-bio.org/mailman/listinfo/biojava-dev
>>>
>>
>>
>>
> _______________________________________________
> biojava-dev mailing list
> biojava-dev at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/biojava-dev




More information about the biojava-dev mailing list