Hi,

I think you need the log4j.properties for you portlet in the
application webapp folder.
So it works for me.

If you run tomcat, the jetspeed log4j.properties is not in the
classpath of your portlet application.

Martin


2006/5/19, Ilaria Imperiali <[EMAIL PROTECTED]>:
Hello,
I' am having trouble with log4j in my jetspeed portal.
I have my Log4j.properties file in  jetspeed/web-inf/conf,
and is working perfectly except for my portlets.
It creates the specified file, but it do not log neither into the console o
into my file.
Nor to any other place.
Can anyone give me any clue?
Thanks,
 Ilaria

----------------------------------------------------------

In my porlets and classes I have the following code :

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
…….
private final Log log = LogFactory.getLog(this.getClass());
……..
log.error(e);
------------------------------------------------------------------------

my Log4j.properties :

#
# Logging Configuration
#
log4j.rootLogger = INFO, jetspeed
#
# Jetspeed goes into Jetspeed Log
#
log4j.category.org.apache.jetspeed = DEBUG, jetspeed
log4j.additivity.org.apache.jetspeed = false
log4j.category.org.apache.jetspeed.tools = DEBUG, jetspeed
log4j.additivity.org.apache.jetspeed.tools = false
log4j.category.org.apache.commons.digester = ERROR, digester
log4j.additivity.org.apache.commons.digester = false
#
# Console Category
#
log4j.category.console = INFO, console
log4j.additivity.console = false
#
# myPortlet Category
#
log4j.category.it.myCompany.etc = DEBUG, myPortlet , console
log4j.additivity.it.myCompany.etc = false
########################################################################
#
# Logfile definitions
#
########################################################################
#
# jetspeed.log
#
log4j.appender.jetspeed = org.apache.log4j.FileAppender
log4j.appender.jetspeed.file = ${applicationRoot}/logs/jetspeed.log
log4j.appender.jetspeed.layout = org.apache.log4j.PatternLayout
log4j.appender.jetspeed.layout.conversionPattern = %d [%t] %-5p %c - %m%n
log4j.appender.jetspeed.append = false


log4j.appender.digester = org.apache.log4j.FileAppender
log4j.appender.digester.file = ${applicationRoot}/logs/digester.log
log4j.appender.digester.layout = org.apache.log4j.PatternLayout
log4j.appender.digester.layout.conversionPattern = %d [%t] %-5p %c - %m%n
log4j.appender.digester.append = false
#
# Console
#
log4j.appender.console=org.apache.log4j.ConsoleAppender
log4j.appender.console.layout=org.apache.log4j.PatternLayout
log4j.appender.console.layout.conversionPattern = %d [%t] %-5p %c - %m%n
#
# myPortlet-portlet.log
#
log4j.appender.myPortlet = org.apache.log4j.FileAppender
log4j.appender.myPortlet.file = ${applicationRoot}/logs/myPortlet.log
log4j.appender.myPortlet.layout = org.apache.log4j.PatternLayout
log4j.appender.myPortlet.layout.conversionPattern = %d [%t] %-5p %c - %m%n
log4j.appender.myPortlet.append = false



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

  • Re: log4j Martin Dulisch

Reply via email to