mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alan D. Cabrera" <l...@toolazydogs.com>
Subject Re: Not sure why...
Date Tue, 19 Jan 2010 19:10:49 GMT

On Jan 19, 2010, at 10:45 AM, Emmanuel LŽcharny wrote:

> Alan D. Cabrera a écrit :
>>
>>>
>>> Just one more thing that I noted in the class, there are no log
>>> statements. Dom't we need them?
>>
>> I'm against logging exceptions if we're re-throwing them unless we  
>> print out some critical piece of information that cannot be  
>> discerned by any other method.  I say this from experience where I  
>> had to slog through millions of log statements generated by one  
>> exception where every well meaning layer printed something out.
> IMO, we should log :
> - where we got the exception if we know that no log has already been  
> generated

I'm against this since you usually have no idea if someone else has  
logged the error.

> - if and only if the log adds some value to what has already be loaded

Agreed.  I think that "unless we print out some critical piece of  
information that cannot be discerned by any other method." catches  
this case.

> - In some case, it might be interesting to use a specific logger.  
> For instance, if you grab a new connection to a LDAP serve,r and get  
> an exception, using a dedicated logger can help when analysing  
> specifically all the LDAP related issues.

Interesting idea but my experience has been that you need a "larger"  
context to make sense of things.  I think that if we did have a  
dedicated logger then we would log to both w/ the chattier logging  
going to the dedicated logger.


Regards,
Alan


Mime
View raw message