Re: Barracuda: Logging in SessionListener classes

Stefan Armbruster <[email protected]>
Newsgroups gmane.comp.java.enhydra.barracuda.general
Message-ID <[email protected]>
Hi Jake,

Am Sam, 2002-11-30 um 20.39 schrieb Jacob Kjome:
> Have you re mapped the entry in the web.xml for Log4jInit Log4j
> initialization?
Yes, I changed the package name for Log4jInit according to Christian's
description.
I get all the logging statements from my "normal" classes like,
Gateways, Models, etc. The only thing I cannot see in the log file is
the output of my own SessionListener.
What is the right position of my own SessionListener?

like this:
    <listener>
        <listener-class>
        org.enhydra.barracuda.webapp.log4j.Log4jApplicationWatch
        </listener-class>
    </listener>
    <listener>
        <listener-class>
        armbrust.test.SessionListener
        </listener-class>
    </listener>

or this:
    <listener>
        <listener-class>
        armbrust.test.SessionListener
        </listener-class>
    </listener>
    <listener>
        <listener-class>
        org.enhydra.barracuda.webapp.log4j.Log4jApplicationWatch
        </listener-class>
    </listener>


Regards,
Stefan

> 
> Make sure you modify your web.xml to look like the following:
> 
>     <listener>
>         <listener-class>
>         org.enhydra.barracuda.webapp.log4j.Log4jApplicationWatch
>         </listener-class>
>     </listener>
> 
>     <servlet>
>         <servlet-name>log4j-init</servlet-name>
>        
> <servlet-class>org.enhydra.barracuda.webapp.log4j.Log4jInit</servlet-class>
>         ....
>         ....
>         ....
>     </servlet>
> 
> 
> Jake
> 
> At 09:42 PM 11/28/2002 +0100, you wrote:
> > Hi,
> > 
> > since the recent refactoring updates I get a small problem when
> > using
> > SessionListeners.
> > Like any "normal" barracuda class, my implementation of
> > HttpSessionListener interface provides a static Logger. But unlike
> > the
> > normal classes, the logging strings of the SessionListener do not
> > appear
> > in the "main.log" as specified in log4j.xml. Instead, I see in
> > catalina.out these lines:
> > log4j:WARN No appenders could be found for logger
> > (armbrust.yeditor.SessionListener).
> > log4j:WARN Please initialize the log4j system properly.
> > I took care of all changes required, like Christian discribed it
> > yesterday.
> > With the "old" version (before the refactoring of barracuda) the
> > logging
> > of SessionListener appears in main.log.
> > 
> > Any hints?
> > 
> > Thanks,
> > Stefan
> > 
> > _______________________________________________
> > Barracuda mailing list
> > [email protected]
> > http://www.enhydra.org/mailman/listinfo.cgi/barracuda
> > FAQ - http://www.jguru.com/faq/Barracuda


_______________________________________________
Barracuda mailing list
[email protected]
http://www.enhydra.org/mailman/listinfo.cgi/barracuda
FAQ - http://www.jguru.com/faq/Barracuda
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.