You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Albretch Mueller <lb...@gmail.com> on 2007/11/02 02:09:58 UTC

Trying to use the "juli" Loggers within Tomcat

 Hi,
 ~
  all I need is going like this from within a servlet
 ~
  Logger Lg = LoggerFactory.getLogger();
  Lg.log("blah");
 ~
  I am able to attach a logger to a webapp but I don't know how to use
 loggers to occassionally debug servlets and I couldn't find anything
when I searched for it
 ~
  How do you do that?
 ~
 Thanks
  lbrtchx

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Trying to use the "juli" Loggers within Tomcat

Posted by Albretch Mueller <lb...@gmail.com>.
 where "foo" in:
~
> java.util.logging.Logger juliLogger = java.util.logging.Logger.getLogger("foo");
~
 is one the name of one of the loggers your defined in the
logging.properties file in the webapp right?
~
 Where could I find more detailed info on this?
~
 I stopped using TC some time ago and now I notice how much things
have changed ;-)
~
 Thanks
 lbrtchx
~
On 11/1/00, mgainty@hotmail.com <mg...@hotmail.com> wrote:
> org.apache.logging.julbridge.MockAppender mockAppender = new
> org.apache.logging.julbridge.MockAppender();
> Logger.getRootLogger().addAppender(mockAppender);
> java.util.logging.Logger juliLogger =
> java.util.logging.Logger.getLogger("foo");
> juliLogger.info("boo");
>
>
> M--
> ----- Original Message -----
> Wrom: FPEGAUTFJMVRESKPNKMBIPBARHDMNNSKVFVWRK
> To: <us...@tomcat.apache.org>
> Sent: Thursday, November 01, 2007 8:09 PM
> Subject: Trying to use the "juli" Loggers within Tomcat
>
>
> > Hi,
> >  ~
> >   all I need is going like this from within a servlet
> >  ~
> >   Logger Lg = LoggerFactory.getLogger();
> >   Lg.log("blah");
> >  ~
> >   I am able to attach a logger to a webapp but I don't know how to use
> >  loggers to occassionally debug servlets and I couldn't find anything
> > when I searched for it
> >  ~
> >   How do you do that?
> >  ~
> >  Thanks
> >   lbrtchx
> >
> > ---------------------------------------------------------------------
> > To start a new topic, e-mail: users@tomcat.apache.org
> > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail: users-help@tomcat.apache.org
> >
> >
>
>

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org