Oops, in fact I forgot to initialise it with DOMConfigurator.

So now it works :o).

On Tue, 14 May 2002 14:56:26 +0200
Didier Bretin <[EMAIL PROTECTED]> wrote:

> Hello,
> 
>   First, I'm with: tomcat-4.0.3 and log4j-1.2
> 
>   The example 2 of the manual tells me to do:
>      export TOMCAT_OPTS="-Dlog4j.configuration=foobar.xml"
> 
>   So I do and launch tomcat: ./bin/catalina.sh start
> 
>   And before I create a foobar.xml file in my webapps/WEB-INF/classes directory.
> 
>   When I launch my servlet I got this error:
> 
> log4j:WARN No appenders could be found for logger (com.informactis.mypackage).
> log4j:WARN Please initialize the log4j system properly.
> 
> My servlet is simple as this:
> 
> import javax.servlet.*;
> import javax.servlet.http.*;
> import org.apache.log4j.Logger;
> import java.io.*;
> 
> public class Exemple extends HttpServlet
> {
>       private static Logger logger = Logger.getLogger ( "com.informactis.mypackage" 
>);
> 
>       protected void doGet ( HttpServletRequest req, HttpServletResponse res)
>       throws ServletException, IOException
>       {
>               res.setContentType("text/html");
>               res.setHeader("pragma", "no-cache");
>               PrintWriter out = res.getWriter();
>               out.print("test");
>               out.close();
>               
>               logger.debug ( "didier" );
>       }
> }
> 
> Do I forgot something ?!?!
> 
> Thanks for your help.
> -- 
>             .------------------------------------------------.
>     .^.     | Didier Bretin, France | [EMAIL PROTECTED]    |
>     /V\     |-----------------------| www.informactis.com    |
>    // \\    |                       `------------------------|
>   /(   )\   | Visit: http://www.vim.org/                     |
>    ^^-^^    `------------------------------------------------'
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
> 


-- 
            .------------------------------------------------.
    .^.     | Didier Bretin, France | [EMAIL PROTECTED]    |
    /V\     |-----------------------| www.informactis.com    |
   // \\    |                       `------------------------|
  /(   )\   | Visit: http://www.vim.org/                     |
   ^^-^^    `------------------------------------------------'

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to