You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Chris Huisman <ch...@chenomx.com> on 2003/06/12 21:36:55 UTC
problems with log4j & logging taglib
</taglib>
and the context for my app in servlet.xml
<Context path="/myapp"
reloadable="true"
docBase="/home/chuisman/workspace/myapp"
workDir="/home/chuisman/workspace/myapp/work/org/apache/jsp" />
and my log4j.properties file:
log4j.rootLogger=DEBUG, A1
log4j.appender.A1=org.apache.log4j.FileAppender
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.file=../logs/myapp.log
# Print the date in ISO 8601 format
log4j.appender.A1.layout.ConversionPattern=%d [%t] %-5p %c - %m%n
# Print only messages of level WARN or above in the package com.foo.
log4j.logger.org.apache=WARN
I put the log4j.properties file in the /WEB-INF/classes directory.
Also, the file does not get created unless i use a servlet to initialize the
logger. If i don't use this, no file is created. How do I get the file to
be created without using a servlet to initialize it?
c.
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org
RE: problems with log4j & logging taglib
Posted by Chris Huisman <ch...@chenomx.com>.
Sorry,
A portion of my message was cut off (cut and paste problem). Here is what i
had intended:
Hello,
I am having trouble getting my jsps to use the log taglib, using Tomcat
4.1.24, under linux with the latest log4j and logging taglib.
I can initialize and use log4j from a servlet, but when i attempt to use
them in jsps using the taglib, nothing is written out. My docbase for my
app is not under $TOMCAT_HOME/webapps/Myapp, instead it is under a network
dir.
It does, however, log when i try the example log application.
this is the taglib descriptor in my web.xml file
<taglib>
<taglib-uri>http://jakarta.apache.org/taglibs/log-1.0</taglib-uri>
<taglib-location>/WEB-INF/taglibs-log.tld</taglib-location>
</taglib>
and the context for my app in servlet.xml
<Context path="/myapp"
reloadable="true"
docBase="/home/chuisman/workspace/myapp"
workDir="/home/chuisman/workspace/myapp/work/org/apache/jsp" />
and my log4j.properties file:
log4j.rootLogger=DEBUG, A1
log4j.appender.A1=org.apache.log4j.FileAppender
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.file=../logs/myapp.log
# Print the date in ISO 8601 format
log4j.appender.A1.layout.ConversionPattern=%d [%t] %-5p %c - %m%n
# Print only messages of level WARN or above in the package com.foo.
log4j.logger.org.apache=WARN
I put the log4j.properties file in the /WEB-INF/classes directory.
Also, the file does not get created unless i use a servlet to initialize the
logger. If i don't use this, no file is created. How do I get the file to
be created without using a servlet to initialize it?
Hello,
I am having trouble getting my jsps to use the log taglib, using Tomcat
4.1.24, under linux with the latest log4j and logging taglib.
I can initialize and use log4j from a servlet, but when i attempt to use
them in jsps using the taglib, nothing is written out. My docbase for my
app is not under $TOMCAT_HOME/webapps/Myapp, instead it is under a network
dir.
It does, however, log when i try the example log application.
this is the taglib descriptor in my web.xml file
<taglib>
<taglib-uri>http://jakarta.apache.org/taglibs/log-1.0</taglib-uri>
<taglib-location>/WEB-INF/taglibs-log.tld</taglib-location>
</taglib>
and the context for my app in servlet.xml
<Context path="/myapp"
reloadable="true"
docBase="/home/chuisman/workspace/myapp"
workDir="/home/chuisman/workspace/myapp/work/org/apache/jsp" />
and my log4j.properties file:
log4j.rootLogger=DEBUG, A1
log4j.appender.A1=org.apache.log4j.FileAppender
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.file=../logs/myapp.log
# Print the date in ISO 8601 format
log4j.appender.A1.layout.ConversionPattern=%d [%t] %-5p %c - %m%n
# Print only messages of level WARN or above in the package com.foo.
log4j.logger.org.apache=WARN
I put the log4j.properties file in the /WEB-INF/classes directory.
Also, the file does not get created unless i use a servlet to initialize the
logger. If i don't use this, no file is created. How do I get the file to
be created without using a servlet to initialize it?
thanks again,
c.
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org