You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by Leo Simons <le...@apache.org> on 2002/10/30 17:26:17 UTC

Re: Fwd: %{method} LogKit pattern with Excaliburs LogKitLoggerManager

Hi Shash,

I (for one) didn't reply because I don't know the answer. It seems to me
this is a known limitation, even if it is perhaps not widely known. The
code sample you send seems to be in order at a glance. I am not a logkit
or fortress expert and I don't use the excalibur's logger so I could be
wrong.....

sorry I can't help you,

- Leo

On Wed, 2002-10-30 at 16:21, Shash Chatterjee wrote:
> 
> Hi!
> 
> I posted this on the users' list a couple days back, but did not get an 
> answer.  I am trying to figure out if this is a known limitation of having a 
> "facade" between the end-user app and Logkit, or I am doing something 
> incorrectly.
> 
> Thanks,
> Shash
> 
> >From: "Shash Chatterjee" <sh...@hotmail.com>
> >Reply-To: "Avalon framework users" <av...@jakarta.apache.org>
> >To: <av...@jakarta.apache.org>
> >Subject: %{method} LogKit pattern with Excaliburs LogKitLoggerManager
> >Date: Sun, 27 Oct 2002 23:52:07 -0600
> >
> >Hi!
> >
> >I am trying to use an extended logkit pattern formatter with our
> >Fortress/DefaultContainer-based container.
> >However, %{method} always resolves to
> >"org.apache.avalon.framework.logger.LogKitLogger.debug(LogKitLogger.java:39)
> >".
> >
> >I can see that this is because ExtendPatternFormatter#getMethod() is 
> >popping
> >up to "org.apache.log.Logger" from the call-stack, which still leaves
> >LogKitLogger on the stack above the method I am really intesrested in.
> >
> >I am getting my Logger (org.apache.avalon.framework.logger.Logger) as such:
> >
> >     import org.apache.avalon.excalibur.logger.LogKitLoggerManager;
> >     import org.apache.avalon.excalibur.logger.LoggerManager;
> >     import org.apache.avalon.framework.logger.Logger;
> >
> >     private static Logger rootLogger = null;
> >     private static LoggerManager rootLoggerManager = null;
> >      ......
> >       LogKitLoggerManager tmp = new LogKitLoggerManager();
> >       try {
> >            tmp.contextualize(rootContext);
> >            tmp.configure(logkitConf);  // built from a logkit.xconf
> >      } catch .....
> >         ....
> >      }
> >      rootLoggerManager = tmp;
> >      rootLogger = rootLoggerManager.getLoggerForCategory("root");
> >      rootLogger.debug("......");
> >     .....
> >
> >So, what am I doing wrong and how can I get around this problem?
> >
> >Thanks,
> >Shash




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>