I need help with finding my log4j output files.

I can't find the log4j output files that are supposed to be created from the
code below. Can someone help me out with what I'm missing?  Also, I'd like
to use an xml configuration instead of the log4j.properties file if I could
figure out where I tell the code to look for it. I haven't found any
documentation that "spells" it out, so that I can understand it enough to
actually get this working.

Below is some of the code from some of the log4j examples files that I'm
trying to use: .jsp, log.tld, log4j.properties

I have a .jsp file with the following code:

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<%@ taglib prefix="log" uri="/WEB-INF/log.tld" %>
<HEAD>
<TITLE>Test info</TITLE>
</HEAD>
<BODY>
<h1>Test info</h1>
<log:info>This is body content.</log:info>
<log:info message="This is attribute content." />
<log:info category="test2">This is body content in category
test2.</log:info>
test2.jsp file You should see output in the info logs now.
</BODY>
</html>

I see where the code points to the log.tld file.  Then in the log.tld I see
where it points to the tag .class files.

<tagclass>org.apache.taglibs.log.DebugTag</tagclass>

I have log.jar and log4j-core.jar in my /WEB-INF/lib/ directory.

My log4j.properties file is in /WEB-INF/classes/ directory with this code:

log4j.rootCategory=DEBUG, dest1, dest2
log4j.appender.dest1=org.apache.log4j.ConsoleAppender
log4j.appender.dest1.layout=org.apache.log4j.PatternLayout
log4j.appender.dest1.layout.ConversionPattern=%r %-5p %c %x - %m%n
log4j.appender.dest2=org.apache.log4j.FileAppender
log4j.appender.dest2.File=logtestmar12.log
log4j.appender.dest2.layout=org.apache.log4j.PatternLayout
log4j.appender.dest2.layout.ConversionPattern=%p %t %c : %m%n

When I enter the path to my .jsp file on the browser I get this message
displayed from my .jsp file:

test2.jsp file You should see output in the info logs now.

I thought the location of my logs was determinded by the following statement
in the log4j.properties file:

log4j.appender.dest2.File=logtestmar12.log

But I can't find it. 

Any help that is understandable would be appreciated. 

Thanks.

Sheila


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

Reply via email to