commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phil Steitz <>
Subject Re: [Math] Help in debugging process
Date Sat, 12 Jun 2010 13:44:32 GMT
Gilles Sadowski wrote:
> Hi.
> What do you think of introducing logging statements in CM?
> [If it was already discussed, does someone have a pointer?]

We have not discussed this topic much since the beginning of [math],
when we made the decision to try to avoid any external dependencies
and the dependency that we had in the early pre-1.0 release code on
commons-logging was removed [1].  We have talked about logging in
commons components a few times over the years [2][3] and as Craig
pointed out in [2] the discussion always splits into two parts - the
first part is do you need logging at all in the component and the
second is if you do, what is the right framework to use doing it.
[math] has gotten *much more complex* than it was when we concluded
that we could communicate all we needed to clients via exceptions,
so I think the topic it is worth revisiting now.

Thinking about my personal experience both debugging and using the
library, I see four basic use cases for logging in [math]
0) exception logging
1) progress indication
2) alternative to exceptions for communicating warnings or other
information to the client
3) intermediate results / algorithm traces
I don't see a compelling need for 0)-2) and 2) is in general a bad
idea (even worse than relying on exception messages).  I have
inserted and removed logging for 3) *many* times though and have
even thought about adding "instrumented" versions of some methods to
keep track of and make available to clients intermediate values /
objects.  So I think at least that use case is worth talking about.
 I am sure there are others as well.

Lets decide the first question first - do we *need* logging - before
we attack the second one (how to do it).  Thanks to great work by
Ralph, Simon, Dennis et al over the last couple of years,
introducing logging into commons components is not as scary as it
used to be, so we should not preempt the discussion of whether or
not we should do it with concerns about implementation.



> Best,
> Gilles
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message