logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maarten Coene <MacBelg...@ToughGuy.net>
Subject Re: log4j and J2EE problem
Date Tue, 07 Aug 2001 15:47:05 GMT
I'm using the Reference Implemenation (J2EE1.3 beta2).

Maarten

At 11:10 7/08/2001 -0400, you wrote:

>Maarten,
>
>      What J2EE server are you using? If it is iPlanet Web Server there is
>some changes you need to make to get it to display text to the System.out.
>
>- Tim
>
>____________________________________________________
>Timothy G. Mullé
>Senior Software Architect
>Reuters Valley Forge Solutions Center
>1000 Madison Avenue
>Norristown, PA 19403-2432
>
>Phone: (610) 650-8600 x8340
>Fax:      (610) 650-8170
>
>
> 
>
>                     Maarten 
> Coene 
>
>                     <MacBelgium@Tou        To: 
> log4j-user@jakarta.apache.org
>                     ghGuy.net>             cc: 
>
>                                            Subject:     log4j and J2EE 
> problem
>                     08/07/2001 
>
>                     10:32 
> AM 
>
>                     Please 
> respond 
>
>                     to "LOG4J 
> Users 
>
>                     Mailing 
> List" 
>
> 
>
> 
>
>
>
>
>
>Hi,
>
>I want to use Log4J in my J2EE application, but I cannot manage to get
>started with it: even a simple logging to the system.out doesn't seem to
>work :-(
>
>This is how I tried to do it:
>1. I've created following configuration file named log4j.properties
>
># Set root category priority to DEBUG and its only appender to the
>system.out
>log4j.rootCategory=DEBUG, stdout
>
>#test
>log4j.appender.stdout=org.apache.log4j.ConsoleAppender
>log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
>log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) - %m%n
>
>2. I've placed this file somewhere in the classpath so my J2EE application
>can find it.
>3. I've put this code in a servlet source file (just to test if it works)
>
>public class MainServlet extends HttpServlet {
>
>      private transient static Category cat =
>Category.getInstance(MainServlet.class.getName());
>
>      /** Perform first-call initialization for the MainServlet */
>      public void init() {
>          cat.info("Initializing MainServlet");
>          ...
>      }
>}
>
>When I deploy my application and the servlet got initialized, nothing is
>written to my system.out by log4j (nor is anything written to the
>system.err indicating some errors). Could someone tell me what I'm doing
>wrong here?
>
>thx
>Maarten
>
>--
>Maarten Coene
>Katholieke Universiteit Leuven
>Dept. Computerwetenschappen             Tel: ++32 (0)16/32 78 25
>Celestijnenlaan 200A
>B-3001 Heverlee
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: log4j-user-help@jakarta.apache.org
>
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: log4j-user-help@jakarta.apache.org

--
Maarten Coene
Katholieke Universiteit Leuven
Dept. Computerwetenschappen             Tel: ++32 (0)16/32 78 25
Celestijnenlaan 200A
B-3001 Heverlee



---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org


Mime
View raw message