Hello,
OK, for posterity, here are the settings one needs for getting WO log
output out of Tomcat.
Btw, the log4j syntax is funky when you use the properties files
method of configuration, as I do in this example. It is much more
readable if you use the xml version, which I don't here.
I am also assuming here your install of tomcat is in /usr/local/
tomcat. Very Linuxish. Adjust to meet your needs.
In /usr/local/tomcat/common/classes/log4j.properties, put:
# Get Tomcat's log info written to one file, and only show
individual app output if it is FATAL
log4j.rootLogger=INFO, Tomcat
log4j.appender.Tomcat=org.apache.log4j.FileAppender
log4j.appender.Tomcat.File=${catalina.home}/logs/tomcat.log
log4j.appender.Tomcat.layout=org.apache.log4j.PatternLayout
log4j.appender.Tomcat.layout.ConversionPattern=%p %t %c - %m%n
# Here, the wo/NSLog4jLoggerName values are set to launch01 and
launch02 in the context.xml files, see below
log4j.logger.launch01=FATAL
log4j.logger.launch02=FATAL
# If you want to debug a particular app, uncomment the and adjust
the launch01 to your app's wo/NSLog4jLoggerName env variable
#log4j.logger.launch01=DEBUG,
A2 # <- A2 can be any
name you'd like, just used in this properties file as a param
#log4j.appender.A2=org.apache.log4j.FileAppender
#log4j.appender.A2.File=/usr/local/tomcat/logs/launch01.log
#log4j.appender.A2.layout=org.apache.log4j.PatternLayout
#log4j.appender.A2.layout.ConversionPattern=%-5p %c [%t] %r - %m%n
#log4j.appender.A2.Threshold=DEBUG
For this example, I have two WebObject apps running via one shared
war file. One, launch01, has this context.xml file in:
/usr/local/tomcat/conf/Catalina/launch01.site9.internal/ROOT.xml
<?xml version="1.0" encoding="UTF-8"?>
<Context path="/" docBase="/var/tmp/launch.war" reloadable="true"
antiJARLocking="true">
<Environment name="wo/NSLog4jLoggerName" value="launch01"
type="java.lang.String" override="false"/>
<Environment name="wo/ix.admin.webDocRoot" value="/Library/
WebServer/WebSites/launch01" type="java.lang.String" override="false"/>
</Context>
These settings override the environmental variables in the web.xml
included in /var/tmp/launch.war war file.
Let me know if you have any questions or corrections.
Paul Charles Leddy
[EMAIL PROTECTED]
IT/NOC
Systems Administration and Engineering
On Jul 17, 2007, at 5:24 PM, Paul Charles Leddy wrote:
Hello,
The logs we typically see under /Library/WebObjects/Logs per
application, where do I find the analogous logs under Tomcat 5.5?
Catalina.out and even the application specific file we are
generating using log4j are not giving out stack traces; we need
stack traces to debug where the application is failing.
I see some settings under the web.xml file for NSLog, but don't
understand them.
Thank you,
Paul Charles Leddy
[EMAIL PROTECTED]
IT/NOC
Systems Administration and Engineering
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-deploy mailing list (Webobjects-
[EMAIL PROTECTED])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-deploy/paul%
40site9.com
This email sent to [EMAIL PROTECTED]
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-deploy mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-deploy/archive%40mail-archive.com
This email sent to [EMAIL PROTECTED]