LoggableComponent ?

Tom Zeller tzeller at dragonacea.biz
Wed Jun 19 16:02:45 EDT 2013


>> How do you feel about a new LoggableComponent interface to standardize
>> the getLogPrefix() method introduced into the attribute filter and
>> resolver ?
>
>
> Given the way we do logging now, I'd say I mostly agree with Scott and
> Rod.  Making it an interface makes it public for no clear benefit (at
> present).

Okay, I hear y'all.

> That said: Back awhile ago when we settled on the convention of logging
> in the IdP with a prefix containing the component name, id, etc, I was
> thinking that it seemed desirable to streamline and automate all of that
> somehow, if possible.  I wonder whether there is some way to take
> advantage of SLF4J and/or Logback features that we have never used, or
> maybe extensions points (custom layouts, appenders, etc), to accomplish
> this without making the class doing the logging do it all manually.
> Ideally it would be something minimally invasive the class doing the
> logging.  Perhaps a topic for some research.

MDC springs to mind, but it limits logger implementations. I have
tried a couple of times with varying success. Maybe there is something
else.

> I mention it here b/c:  if there (hypothetically) was some way to attach
> or associate the logging class instance to the logger, then the
> interface could be used to pull the log prefix out and prepend it to the
> log message, either via the layout or a specialized logging component,
> etc.  If something like this were possible, then having this interface
> makes a lot more sense.

I was thinking the LoggableComponent interface would help us
standardized logging, but it seems like we should table or close that
idea.


More information about the dev mailing list