Hi Joerg:

> Victor Mote wrote:
> > OK. Still I miss your point.
> Well, I think loggin is much overrated and it is really 
> overdone in FOP.

I agree. Some of that is a function of being alpha-quality code. As people
get more comfortable that something actually does work, you are right that a
lot of the logging can be removed. The communal nature of open source and
the transient nature of the pool of people working on various pieces of code
contributes to the problem as well. If you have to wade through a lot of
logging code to get anything done, you are more likely to yank it out than
if you ... never actually look at it again.

As far as users go, some folks like a lot of logging, others like less or
none. High-volume batch users generally want more, interactive users want
less. Not every interesting thing that happens warrants throwing an
exception. I have been working on font-selection today, and some users might
be interested to know or even record on a permanent basis that their
first-choice of font-family was not used.

> Fatal errors are fatal errors. Just throw an exception and 
> let someone else figure out what to do. Some examples from 
> the FOP code where logging doesn't help:


I agree.

> FOP needs a facility to notify a user about warnings, 
> recoverable errors and progress reports. There may be a 
> separate facility to provide debug for developers and yet 
> another to provide out-of-band results like ressource ussage 
> statistics and number of generated pages.
> I don't think that generously sprinkling log.stuff() 
> statements all over the place is the best solution to the 
> problems above, even though this seems to fit.

I generally agree, although I seem to like logging better than you or
Jeremias. This could be a cultural legacy from my one-compile-per-day,
the-lineprinter-is-your-debugger days. And perhaps I'll be more in agreement
after I understand the alternatives better.

Anyway, thanks for making your point more clear.

Victor Mote

Reply via email to