Raible's Wiki

Raible Designs
Wiki Home
News
Recent Changes

AppFuse

Homepage
  - Korean
  - Chinese
  - Italian
  - Japanese

QuickStart Guide
  - Chinese
  - French
  - German
  - Italian
  - Korean
  - Portuguese
  - Spanish
  - Japanese

User Guide
  - Korean
  - Chinese

Tutorials
  - Chinese
  - German
  - Italian
  - Korean
  - Portuguese
  - Spanish

FAQ
  - Korean

Latest Downloads

Other Applications

Struts Resume
Security Example
Struts Menu

Set your name in
UserPreferences


Referenced by
Main
TextFormattingRules
WhatIsWiki




JSPWiki v2.2.33

[RSS]


Hide Menu

SandBox


This is version 302. It is not the current version, and thus it cannot be edited.
[Back to current version]   [Restore this version]


this mailing list thread.

What is this SandBox?


List list = new ArrayList();
...
CollectionUtils.forAllDo(list, new Closure() {
    public void execute(Object obj) {
    // execute something for each item obj
    }
});

Configuring (and more importantly, supressing) Tomcat 5.x logging

Create a log4j.properties file in $CATALINA_HOME/common/classes

log4j.rootLogger=ERROR, R
log4j.appender.R=org.apache.log4j.DailyRollingFileAppender
log4j.appender.R.File=${catalina.home}/logs/tomcat.log
log4j.appender.R.DatePattern='.'yyyy-MM-dd
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern={%p} %c{2} %x %m%n
                                                                                                                                           
                                                                                                                                          

You also need to copy commons-logging.jar and log4j-1.2.9.jar to $CATALINA_HOME/common/lib.

Then, in your application log4j.properties file, add this:


# Suppress the tomcat logging whilst DEBUG is switched on
log4j.logger.org.apache.catalina.core=ERROR
log4j.logger.org.apache.catalina.session=ERROR
log4j.logger.org.apache.jasper.compiler=ERROR

Because if, whilst developing, you set your root logger to DEBUG, then it seems to set the Tomcat logging to DEBUG as well, and you will probably witness thousands of lines of compilation trace from the Jasper compiler!


Attachments:


Go to top   More info...   Attach file...
This particular version was published on 06-Nov-2006 13:52:36 MST by BenGill.