On Wed, 27 Nov 2002, Wendy Cameron wrote:

> Date: Wed, 27 Nov 2002 15:09:19 +1000
> From: Wendy Cameron <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: Struts Users Mailing List <[EMAIL PROTECTED]>
> Subject: RE: Commons-logging and JDK 1.4 Logger
>
> Well actually a few more stupid questions cause it doesnt work yet :)
>
> I have created properties file with the following:
>
> org.apache.commons.logging.LogFactory=org.apache.commons.logging.impl.Jdk14Logger
> org.apache.commons.logging.Log=org.apache.commons.logging.impl.Jdk14Logger
>
> Placed it in WEB-INF directory and I have a debug statement in my code
>
> log.trace("init( " +  actions + ")");
>
> in my j2re\lib directory if logging.properties
> java.util.logging.FileHandler.pattern = C:\\inMotion\\logs\\java%u.log

This just says where the log messages go -- not what should be logged.  If
your logger is named "com.foo.MyClass", you'd need to add:

  com.foo.MyClass.level = FINEST

or, if you wanted trace output from all the classes in the com.foo
package:

  com.foo.level = FINEST

For more information about configuring JDK logging, see the JDK
Documentation Bundle -- it's got an article specifically about the logging
features.

One other note -- the JDK logging properties are only read when a
particular JVM first starts using the logging calls, so you'll need to
restart Tomcat to make any changes take effect.

> Is this necessary or is this controlled by:
>
> <Logger className="org.apache.catalina.logger.FileLogger"
>                      prefix="localhost_image_base_log." suffix=".txt"
>                 timestamp="true"/>
>
> in the context declaration in the server.xml?
>

This is just the output from ServletContext.log() calls, not the
commons-logging calls.

> any suggestions?
>
> Regards Wendy
>

Craig



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

Reply via email to