On 17/04/2008, Roman Kalukiewicz <[EMAIL PROTECTED]> wrote:
> 2008/4/17, James Strachan <[EMAIL PROTECTED]>:
>
> > > >> According to this approach, the user is required to modify its
> > CamelRoute
> > > >> by adding :
> > > .to("log:loggingCategory?level=DEBUG")
> > > I thinkh that this appraoch is a little bit invasive.
> > > It should be better to have a static Trace method defined at the level
> of
> > > the CamelContext that we can activate or desactivate in the configure()
> > > method in order to produce INFO, ERROR or DEBUG information and of
> course
> > > generate the required information like the Body class type returned,
> headers
> > > info, ... ?
> >
> >
> > Great idea! :)
> >
> > I guess there's a few different things we could trace...
> >
> > * all the exchange properties
> > * all the message properties
> > * the message headers
> > * the message body type
> > * the message body
> >
> > I wonder if we should always just log all of it; or have a few
> > levels/categories of debug/trace logging so folks can do a less noisy
> > log?
>
>
> Maybe we should simply have a LogProcessor that has an Expression as a
> parameter and logs the value of this expression? This guy could be
> reused by log endpoint then. We could have few predefined log
> categories (that maps to certain Expression) and an ability to
> reference an expression by a bean name maybe like
> log:logger?expression=myExpressionBean
>
> Moreover I believe that we should have something like
> trace(Expression) method on RouteBuilder type.
Great idea! :)
I guess we could easily install the logging via an interceptor. So at
the top of your DSL you could add a logging interceptor which would be
applied to all routes etc.
--
James
-------
http://macstrac.blogspot.com/
Open Source Integration
http://open.iona.com