You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "Vaidya, Abhay" <ab...@atosorigin.com> on 2003/06/13 12:40:36 UTC

Log4j setup for Tapestry

Hi

I am setting up a web site developed (by the client) in Tapestry on iPlanet
6.0 on Win 2000 platform. I want to use log4j as the logging tool. I have
included the log4j1.2.jar in my CLASSPATH however when I start the
application , it aborts with a message "log4j not initialized properly". 
While going thru log4j documentation I came across the log4j.properties file
but don't know how to use it in association with a  Tapestry application
hoasted on iPlanet. Do I have to set an Environment variable which points to
the appender filename ? Could somone tell me how to do it please?

Thanks  in advance.
Abhay

Re: Log4j setup for Tapestry

Posted by worookie <wo...@hotmail.com>.
Hi Howard,
Thanks for your response.
Suppose commons-logging package automatically switch over to JDK logging,
the following is my settings. Do you have any clues why I still get tons of
messages?

==========================================================
<JAVA_HOME>/jre/lib/logging.properties:

handlers= java.util.logging.FileHandler, java.util.logging.ConsoleHandler
.level= WARNING

java.util.logging.FileHandler.pattern = %h/java%u.log
java.util.logging.FileHandler.limit = 50000
java.util.logging.FileHandler.count = 1
java.util.logging.FileHandler.formatter = java.util.logging.XMLFormatter

java.util.logging.ConsoleHandler.level = WARNING
java.util.logging.ConsoleHandler.formatter =
java.util.logging.SimpleFormatter

org.apache.level = WARNING
org.apache.tapestry.level = WARNING
org.apache.commons.level = WARNING

==========================================================
- log4j.properties is placed under <APP_HOME>/WEB-INF/classes (actually,
I've tried cases with and without this file):

# $Id: log4j.properties,v 1.5 2003/03/15 21:22:08 hlship Exp $
# Set root category priority to INFO and its only appender to A1.
log4j.rootCategory=WARN, A1

# A1 is set to be a ConsoleAppender.
log4j.appender.A1=org.apache.log4j.ConsoleAppender

# A1 uses PatternLayout.
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=%r %c{1} [%p] %m%n

log4j.category.org.apache.commons.digester.Digester=FATAL
==========================================================

I am using Tapestry 3.0beta and Tomcat 4.1.24-LE.

Thank you.

Regards,

Rookie

----- Original Message -----
From: "Howard M. Lewis Ship" <hl...@attbi.com>
To: "'Tapestry users'" <ta...@jakarta.apache.org>
Sent: Wednesday, June 18, 2003 4:08 AM
Subject: RE: Log4j setup for Tapestry


> Tapestry users Jakarta's commons-logging package.  It's supposed to switch
over to JDK logging if
> Log4J is not available, but there may be a system property to set.
>
> --
> Howard M. Lewis Ship
> Creator, Tapestry: Java Web Components
> http://jakarta.apache.org/tapestry
>
>
>
> > -----Original Message-----
> > From: worookie [mailto:worookie@hotmail.com]
> > Sent: Tuesday, June 17, 2003 9:03 PM
> > To: Tapestry users
> > Subject: Re: Log4j setup for Tapestry
> >
> >
> > Hi,
> >
> > I do use jdk's logging package, but I never use log4j.
> > (I know how to configure jdk's logging package so as to
> > filter out some unwanted messages.) Now I copied
> > log4j.properties from <TapestryHome>/config and put it in
> > <WebApp>/WEB-INF/classes, and restart the app, but a lot of
> > INFO messages still come out.
> >
> > What did I miss in order to disable showing the INFO messages?
> >
> > I am using Tomcat 4.1.24 + Tapestry 3.0beta.
> >
> > Thank you.
> >
> > Regards,
> >
> > Rookie
> >
> >
> > ----- Original Message -----
> > From: "Sanjeev Hiremath" <sc...@yahoo.com>
> > To: "Tapestry users" <ta...@jakarta.apache.org>
> > Sent: Friday, June 13, 2003 3:53 AM
> > Subject: Re: Log4j setup for Tapestry
> >
> >
> > > create log4j.properties and copy the same
> > > in you classpath.
> > >
> > > you can try putting under WEB-INF/classes in you
> > > Tapestry web application.
> > >
> > >
> > >
> > >
> > >  --- "Vaidya, Abhay" <ab...@atosorigin.com>
> > > wrote: > Hi
> > > >
> > > > I am setting up a web site developed (by the client)
> > > > in Tapestry on iPlanet
> > > > 6.0 on Win 2000 platform. I want to use log4j as the
> > logging tool. I
> > > > have included the log4j1.2.jar in my CLASSPATH however
> > > > when I start the
> > > > application , it aborts with a message "log4j not
> > > > initialized properly".
> > > > While going thru log4j documentation I came across
> > > > the log4j.properties file
> > > > but don't know how to use it in association with a
> > > > Tapestry application
> > > > hoasted on iPlanet. Do I have to set an Environment
> > > > variable which points to
> > > > the appender filename ? Could somone tell me how to
> > > > do it please?
> > > >
> > > > Thanks  in advance.
> > > > Abhay
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>

RE: Log4j setup for Tapestry

Posted by "Howard M. Lewis Ship" <hl...@attbi.com>.
Tapestry users Jakarta's commons-logging package.  It's supposed to switch over to JDK logging if
Log4J is not available, but there may be a system property to set.

--
Howard M. Lewis Ship
Creator, Tapestry: Java Web Components
http://jakarta.apache.org/tapestry



> -----Original Message-----
> From: worookie [mailto:worookie@hotmail.com] 
> Sent: Tuesday, June 17, 2003 9:03 PM
> To: Tapestry users
> Subject: Re: Log4j setup for Tapestry
> 
> 
> Hi,
> 
> I do use jdk's logging package, but I never use log4j.
> (I know how to configure jdk's logging package so as to 
> filter out some unwanted messages.) Now I copied 
> log4j.properties from <TapestryHome>/config and put it in 
> <WebApp>/WEB-INF/classes, and restart the app, but a lot of 
> INFO messages still come out.
> 
> What did I miss in order to disable showing the INFO messages?
> 
> I am using Tomcat 4.1.24 + Tapestry 3.0beta.
> 
> Thank you.
> 
> Regards,
> 
> Rookie
> 
> 
> ----- Original Message -----
> From: "Sanjeev Hiremath" <sc...@yahoo.com>
> To: "Tapestry users" <ta...@jakarta.apache.org>
> Sent: Friday, June 13, 2003 3:53 AM
> Subject: Re: Log4j setup for Tapestry
> 
> 
> > create log4j.properties and copy the same
> > in you classpath.
> >
> > you can try putting under WEB-INF/classes in you
> > Tapestry web application.
> >
> >
> >
> >
> >  --- "Vaidya, Abhay" <ab...@atosorigin.com>
> > wrote: > Hi
> > >
> > > I am setting up a web site developed (by the client)
> > > in Tapestry on iPlanet
> > > 6.0 on Win 2000 platform. I want to use log4j as the 
> logging tool. I 
> > > have included the log4j1.2.jar in my CLASSPATH however
> > > when I start the
> > > application , it aborts with a message "log4j not
> > > initialized properly".
> > > While going thru log4j documentation I came across
> > > the log4j.properties file
> > > but don't know how to use it in association with a
> > > Tapestry application
> > > hoasted on iPlanet. Do I have to set an Environment
> > > variable which points to
> > > the appender filename ? Could somone tell me how to
> > > do it please?
> > >
> > > Thanks  in advance.
> > > Abhay
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 


Re: Log4j setup for Tapestry

Posted by worookie <wo...@hotmail.com>.
Hi Sanjeev,

Thanks for your tips.
I tried to place log4j-1.2.6.jar under WEB-INF/classes (and also
WEB-INF/lib, <TOMCAT_HOME>/common/lib, etc), but tons of messages still come
out.
The messages look like:

20 [main] INFO util.AdaptorRegistry  - Registered
org.apache.tapestry.Tapestry......

Could you please verify that the contents of my log4j.propertise (which is
directly copied from <TAPESTRY_HOME>/config) as follows is correct? Thank
you.

============================================================
# $Id: log4j.properties,v 1.5 2003/03/15 21:22:08 hlship Exp $
# Set root category priority to INFO and its only appender to A1.
log4j.rootCategory=WARN, A1

# A1 is set to be a ConsoleAppender.
log4j.appender.A1=org.apache.log4j.ConsoleAppender

# A1 uses PatternLayout.
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=%r %c{1} [%p] %m%n

log4j.category.org.apache.commons.digester.Digester=FATAL
============================================================

Thank you for your help.

Regards,

Rookie

----- Original Message -----
From: "Sanjeev Hiremath" <sc...@yahoo.com>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Wednesday, June 18, 2003 1:15 AM
Subject: Re: Log4j setup for Tapestry


> I never used Jdk logging package but I used/using
> Log4j.
> When ever I see loads and loads of messages on console
> even after placing log4j.properties I use to place
> log4j.jar under WEB-INF/classes. That's it.
>
>
>  --- worookie <wo...@hotmail.com> wrote: > Hi,
> >
> > I do use jdk's logging package, but I never use
> > log4j.
> > (I know how to configure jdk's logging package so as
> > to filter out some
> > unwanted messages.)
> > Now I copied log4j.properties from
> > <TapestryHome>/config and put it in
> > <WebApp>/WEB-INF/classes, and restart the app, but a
> > lot of INFO messages
> > still come out.
> >
> > What did I miss in order to disable showing the INFO
> > messages?
> >
> > I am using Tomcat 4.1.24 + Tapestry 3.0beta.
> >
> > Thank you.
> >
> > Regards,
> >
> > Rookie
> >
> >
> > ----- Original Message -----
> > From: "Sanjeev Hiremath" <sc...@yahoo.com>
> > To: "Tapestry users"
> > <ta...@jakarta.apache.org>
> > Sent: Friday, June 13, 2003 3:53 AM
> > Subject: Re: Log4j setup for Tapestry
> >
> >
> > > create log4j.properties and copy the same
> > > in you classpath.
> > >
> > > you can try putting under WEB-INF/classes in you
> > > Tapestry web application.
> > >
> > >
> > >
> > >
> > >  --- "Vaidya, Abhay" <ab...@atosorigin.com>
> > > wrote: > Hi
> > > >
> > > > I am setting up a web site developed (by the
> > client)
> > > > in Tapestry on iPlanet
> > > > 6.0 on Win 2000 platform. I want to use log4j as
> > the
> > > > logging tool. I have
> > > > included the log4j1.2.jar in my CLASSPATH
> > however
> > > > when I start the
> > > > application , it aborts with a message "log4j
> > not
> > > > initialized properly".
> > > > While going thru log4j documentation I came
> > across
> > > > the log4j.properties file
> > > > but don't know how to use it in association with
> > a
> > > > Tapestry application
> > > > hoasted on iPlanet. Do I have to set an
> > Environment
> > > > variable which points to
> > > > the appender filename ? Could somone tell me how
> > to
> > > > do it please?
> > > >
> > > > Thanks  in advance.
> > > > Abhay

Re: Log4j setup for Tapestry

Posted by Sanjeev Hiremath <sc...@yahoo.com>.
I never used Jdk logging package but I used/using
Log4j.
When ever I see loads and loads of messages on console
even after placing log4j.properties I use to place
log4j.jar under WEB-INF/classes. That's it.


 --- worookie <wo...@hotmail.com> wrote: > Hi,
> 
> I do use jdk's logging package, but I never use
> log4j.
> (I know how to configure jdk's logging package so as
> to filter out some
> unwanted messages.)
> Now I copied log4j.properties from
> <TapestryHome>/config and put it in
> <WebApp>/WEB-INF/classes, and restart the app, but a
> lot of INFO messages
> still come out.
> 
> What did I miss in order to disable showing the INFO
> messages?
> 
> I am using Tomcat 4.1.24 + Tapestry 3.0beta.
> 
> Thank you.
> 
> Regards,
> 
> Rookie
> 
> 
> ----- Original Message -----
> From: "Sanjeev Hiremath" <sc...@yahoo.com>
> To: "Tapestry users"
> <ta...@jakarta.apache.org>
> Sent: Friday, June 13, 2003 3:53 AM
> Subject: Re: Log4j setup for Tapestry
> 
> 
> > create log4j.properties and copy the same
> > in you classpath.
> >
> > you can try putting under WEB-INF/classes in you
> > Tapestry web application.
> >
> >
> >
> >
> >  --- "Vaidya, Abhay" <ab...@atosorigin.com>
> > wrote: > Hi
> > >
> > > I am setting up a web site developed (by the
> client)
> > > in Tapestry on iPlanet
> > > 6.0 on Win 2000 platform. I want to use log4j as
> the
> > > logging tool. I have
> > > included the log4j1.2.jar in my CLASSPATH
> however
> > > when I start the
> > > application , it aborts with a message "log4j
> not
> > > initialized properly".
> > > While going thru log4j documentation I came
> across
> > > the log4j.properties file
> > > but don't know how to use it in association with
> a
> > > Tapestry application
> > > hoasted on iPlanet. Do I have to set an
> Environment
> > > variable which points to
> > > the appender filename ? Could somone tell me how
> to
> > > do it please?
> > >
> > > Thanks  in advance.
> > > Abhay
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> tapestry-user-help@jakarta.apache.org
>  

__________________________________________________
Yahoo! Plus
For a better Internet experience
http://www.yahoo.co.uk/btoffer

Re: Log4j setup for Tapestry

Posted by worookie <wo...@hotmail.com>.
Hi,

I do use jdk's logging package, but I never use log4j.
(I know how to configure jdk's logging package so as to filter out some
unwanted messages.)
Now I copied log4j.properties from <TapestryHome>/config and put it in
<WebApp>/WEB-INF/classes, and restart the app, but a lot of INFO messages
still come out.

What did I miss in order to disable showing the INFO messages?

I am using Tomcat 4.1.24 + Tapestry 3.0beta.

Thank you.

Regards,

Rookie


----- Original Message -----
From: "Sanjeev Hiremath" <sc...@yahoo.com>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Friday, June 13, 2003 3:53 AM
Subject: Re: Log4j setup for Tapestry


> create log4j.properties and copy the same
> in you classpath.
>
> you can try putting under WEB-INF/classes in you
> Tapestry web application.
>
>
>
>
>  --- "Vaidya, Abhay" <ab...@atosorigin.com>
> wrote: > Hi
> >
> > I am setting up a web site developed (by the client)
> > in Tapestry on iPlanet
> > 6.0 on Win 2000 platform. I want to use log4j as the
> > logging tool. I have
> > included the log4j1.2.jar in my CLASSPATH however
> > when I start the
> > application , it aborts with a message "log4j not
> > initialized properly".
> > While going thru log4j documentation I came across
> > the log4j.properties file
> > but don't know how to use it in association with a
> > Tapestry application
> > hoasted on iPlanet. Do I have to set an Environment
> > variable which points to
> > the appender filename ? Could somone tell me how to
> > do it please?
> >
> > Thanks  in advance.
> > Abhay

Re: Log4j setup for Tapestry

Posted by Sanjeev Hiremath <sc...@yahoo.com>.
create log4j.properties and copy the same
in you classpath.

you can try putting under WEB-INF/classes in you
Tapestry web application.




 --- "Vaidya, Abhay" <ab...@atosorigin.com>
wrote: > Hi
> 
> I am setting up a web site developed (by the client)
> in Tapestry on iPlanet
> 6.0 on Win 2000 platform. I want to use log4j as the
> logging tool. I have
> included the log4j1.2.jar in my CLASSPATH however
> when I start the
> application , it aborts with a message "log4j not
> initialized properly". 
> While going thru log4j documentation I came across
> the log4j.properties file
> but don't know how to use it in association with a 
> Tapestry application
> hoasted on iPlanet. Do I have to set an Environment
> variable which points to
> the appender filename ? Could somone tell me how to
> do it please?
> 
> Thanks  in advance.
> Abhay
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> tapestry-user-help@jakarta.apache.org
>  

__________________________________________________
Yahoo! Plus - For a better Internet experience
http://uk.promotions.yahoo.com/yplus/yoffer.html