Hi all

As you can just mention, I am new to cactus and have problems with
activating the logging subsystem. I just want to activate the logging
for the server side and the client side. I'm not quite sure if that
works what I want to do. Anyway, here are my configurations:

- I am using Eclipse with the JUnit 4 plugin and start the test case
from there.
- I have a servlet test case
- the cactus.logging.config file is available in the local classpath
(eclipse) as well on the server side (WEB-INF/classes). Just to be sure.
- the log4j.properties file is in the same directory as mentioned above
(for the client in the classpath of eclipse and for the server in
WEB-INF/classes)
- I am using the cactus version 1.8.0
- JUnit version 4.4
- working on Linux with java version 1.6.0_03

Here is my cactus.logging.config file:

#
-----------------------------------------------------------------------------
# Logging properties
#
-----------------------------------------------------------------------------

# Disable logging by default when running the tests. If you wish to use
a 
# logging subsystem, uncomment the line below. That will let Commons
logging
# decide automatically of a suitable logging system for you. You can
also force
# commons-logging to use a specific logging system. For more info, see
# http://jakarta.apache.org/commons/logging

# Disable logging
#org.apache.commons.logging.Log =
org.apache.commons.logging.impl.NoOpLog

# Force to use JDK 1.4 logging
#org.apache.commons.logging.Log =
org.apache.commons.logging.impl.Jdk14Logger

# Force to use Log4J logging
org.apache.commons.logging.Log =
org.apache.commons.logging.impl.Log4JLogger

# Force to use Simple logging
#org.apache.commons.logging.Log =
org.apache.commons.logging.impl.SimpleLog

# ---- JDK 1.4 logging properties

# Following properties are useful if you're using the JDK 1.4 logging
subsystem
# and wish to output logs to a file. Make sure to comment out the
NoOpLog line 
# above.
java.util.logging.config.file = @target.dir@/logging_client.properties
handlers = java.util.logging.FileHandler
java.util.logging.FileHandler.pattern = @target.dir@/test_client.log
java.util.logging.FileHandler.formatter =
java.util.logging.SimpleFormatter

# If you want to provide finer grained logging, restrict the level for
the 
# specific package name. 
# For example: 
# org.apache.cactus.server.level = ALL
# org.apache.commons.httpclient.level = ALL
# .level = ALL
org.apache.cactus.level = ALL

# ---- Log4J logging properties

# Following properties are useful if you're using the Log4J logging
subsystem
# and wish to output logs to a file. Make sure to comment out the
NoOpLog line 
# above.
log4j.configuration = log4j.properties

log4j.appender.cactus = org.apache.log4j.FileAppender
log4j.appender.cactus.File
= /${myHomeDirectory}/workspace/${myProject}/test_client.log
log4j.appender.cactus.Append = true
log4j.appender.cactus.layout = org.apache.log4j.PatternLayout
log4j.appender.cactus.layout.ConversionPattern = %d{ABSOLUTE} [%t] %-5p
%-30.30c{2} %x - %m %n

# Any application log which uses Log4J will be logged to the Cactus log
file
log4j.rootCategory=DEBUG, cactus

# Debug logs for Cactus
log4j.category.org.apache.cactus = DEBUG, cactus
log4j.additivity.org.apache.cactus = false

# Debug logs for HttpClient
log4j.category.org.apache.commons.httpclient = DEBUG, cactus
log4j.additivity.org.apache.commons.httpclient = false
log4j.category.httpclient = WARN, cactus
log4j.additivity.httpclient = false

# ---- SimpleLog logging properties

org.apache.commons.logging.simplelog.showlogname = true
org.apache.commons.logging.simplelog.log.org.apache.cactus = trace
org.apache.commons.logging.simplelog.log.org.apache.commons.httpclient =
trace

/****************/
In principle I changed only the properties 'log4j.appender.cactus.File'
and 'log4j.configuration' and activated the logging explicitly.

My cactus.properties is looking like this:

cactus.contextURL = http://localhost:8080/cactified_project
cactus.logging.config = bin/cactus.logging.config
cactus.enableLogging = true

/***************/
So what do I have done wrong?? I think I have followed the description
on the website...

Appreciate any help. Thanks.


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

Reply via email to