Joe Batt wrote:

> Given the above is true, you could use something as simple as printlns
> to s global print writer.  In debug mode it would go to the bit bucket.
> OK, I've used log4j, so I understand you may want something a little
> more substantial than that, but why does the user care to integrate FOP
> debugging into a larger logging structure?


I agree with all of your other points - I think you state the purpose
of logging very clearly. However, for this point, my answer
is: yes, the user does care, because:

1. If a solution is deployed at a user's site and the user observes problems,
   he or she wants to be able to reproduce the problems with logging turned
   on, because then the log file can be sent to the creator of the solution,
   whether that's a company or an open source initiative.

2. If a solution consists of multiple building blocks like FOP, and the
   user wants to turn on logging for the reason outlined under 1., then
   it's preferable that all building blocks share the same logging mechanism.

Nevertheless, I have another point about user-side logging that matches your
points nicely:

However much I like logging (I actually prefer logging and staring into
source code over using debuggers), I have one general problem with logging
in the "production code". Quite a number of developers seem to misunderstand
logging as a replacement for careful and thorough error handling and recovery.
In my opinion, logging (in production code) is always only a diagnostic
enhancement of error handling - not a replacement.

BTW: Yes, I do prefer log output over no error handling at all. 8-)

Arnd Beissner
--
Arnd Beißner IT-Engineering
Bahnhofstr. 3, 71063 Sindelfingen, Germany
Email: [EMAIL PROTECTED]
Phone: +49-7031-463458
Mobile: +49-173-3016917

Reply via email to