On Tue, 2008-04-01 at 09:44 -0700, Tatu Saloranta wrote:
> --- Sam Berlin <[EMAIL PROTECTED]> wrote:
> 
> > Hi Folks,
> > 
> > There's been a number of times that we've been
> > looking to debug things
> > within httpcore & httpcore-nio, but have to resort
> > to recompiling
> > and/or using a debugger with breakpoints, due to no
> > logging within the
> > package.  I can understand the desire to reduce
> 
> I somewhat disagree in that using a debugger with
> breakpoints is considered a work-around: especially if
> contrasted to speculative insertion of logging 
> statements that mess up otherwise clean code and only
> provides useful information for narrow cases of
> debugging.
> To me, logging statements in production are generally
> to be used for reporting unusual things happening, and
> not for indicating normal control flow. If you want to
> follow the control flow, stepping through the code in
> debugger is the simplest way to go about it.
> I do understand that debugging a multi-thread thing
> obviously can be tricky, but same problems often apply
> to logging, which flattens textual messages into
> combined streams (except for the particular problem of
> things timing out).
> 
> This is of course an area where styles and taste
> differ a lot between developers. But I think perhaps
> it'd be better to think hard about good ways to solve
> the actual problem (how to debug problems that
> commonly occur) instead of focusing on one particular
> approach developers tend to take, regardless of
> whether it is an optimal way. For me, a better
> alternative often is to allow adding listeners for
> events that are of interest during debugging (I think
> there already are a few types one can attach so maybe
> that path is already available and/or exhausted?).
> This allows for developers to plug-in particular
> diagnostics extensions they want, including simpler
> loggers.

I am of the same opinion.


> This is also one of few areas where aspect-oriented
> stuff makes a lot of sense.
> 

I agree. I think the byte code enhancement is probably the cleanest way
to add _debug_ logging for low level libraries such as HttpCore.

Cheers

Oleg


> Just my 2 cents,
> 
> -+ Tatu +-
> 
> 
> 
>       
> ____________________________________________________________________________________
> You rock. That's why Blockbuster's offering you one month of Blockbuster 
> Total Access, No Cost.  
> http://tc.deals.yahoo.com/tc/blockbuster/text5.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to