Hi Aaron, Thanks for the providing the log4j file. It works just fine and JCS has wonderful logs.
Initially it didn't work because the problem was in the setup that I was using. When I tried the same log4j file in WSAD (java editor), it worked just fine. I will see at my end as to why it didn't work when I run the test cases from console, might be some issue with classpath or JDK version.
From my side this *Issue is closed* now.
Thanks a ton, Rupesh K On 7/14/06, Aaron Smuts <[EMAIL PROTECTED]> wrote:
Make sure to have the configuration file and the log4j jar in the classpath. Also it must have permission to write to the directory, and the directory must exist. I think you should read up a bit more on how to configure log4j. The commons logging package also has some useful documentation. http://jakarta.apache.org/commons/logging/commons-logging-1.1/guide.html#Configuring_Log4J When testing JCS, I use a log4j.properties file that logs both to a log file and the console. You'll need to alter the file location, but the example is here: http://svn.apache.org/viewvc/jakarta/jcs/trunk/src/test-conf/log4j.properties?revision=399469&view=markup --- Rupesh Khandelwal <[EMAIL PROTECTED]> wrote: > Hi Aaron, > > I looked for some file with name log4j.xml or > log4j.properties in JCS jar. > Din't find any. > > I was not aware of the default behaviour of log4j. > Thanks for pointing that > out. I found a couple of threads on Log4j forums > dating somewhere in > 2004-2005. Around that time default level was DEBUG. > > To enable DEBUG logs of JCS I created a > log4j.properties file of my own and > placed it in classpath. Following are the contents > of properties file > > log4j.appender.dest1=org.apache.log4j.ConsoleAppender > log4j.appender.dest2=org.apache.log4j.FileAppender > log4j.appender.dest1.layout=org.apache.log4j.PatternLayout > log4j.appender.dest2.layout=org.apache.log4j.PatternLayout > log4j.appender.dest2.File=example.log > log4j.rootCategory=DEBUG, dest1, dest2 > > I am not getting any DEBUG level logs yet. > > Your inputs are highly awaited. > > Thanks, > Rupesh K > > > > > On 7/12/06, Aaron Smuts <[EMAIL PROTECTED]> wrote: > > > > The logging is done via commons-logging, which is > > pretty much just a wrapper around log4j. You > don't > > change the logging to debug, you change the log > level > > to debug so that the log messages that are written > at > > the debug level will be logged. > > > > Read the log4j documentation for more information > on > > how to configure the logger. > > > > --- Rupesh Khandelwal > <[EMAIL PROTECTED]> > > wrote: > > > > > Hi, > > > > > > For last few days I have been studying JCS for > its > > > suitability for my > > > application. I have read Product Documentation. > I > > > have been through last > > > four months mails on JCS Users List. > > > > > > To improve my understanding of how JCS works I > want > > > to set the JCS logging > > > level to DEBUG. How can I do that? > > > > > > Log messages on console currently are as under > > > > > > Jul 12, 2006 11:20:34 AM > > > > > > org.apache.jcs.engine.control.CompositeCacheManagerconfigure > > > INFO: Creating cache manager from config file: > > > /cache.ccf > > > Jul 12, 2006 11:20:34 AM > > > > > > org.apache.jcs.utils.threadpool.ThreadPoolManagerloadConfig > > > INFO: thread_pool.default PoolConfiguration = > > > useBoundary = > > > [true]boundarySize = [2000]maximumPoolSize = > > > [150]minimumPoolSize = > > > [4]keepAliveTime = [300000]whenBlockedPolicy = > > > [RUN]startUpSize = [4] > > > Jul 12, 2006 11:20:34 AM > > > > > > org.apache.jcs.engine.control.CompositeCacheConfigurator > > > setDefaultAuxValues > > > INFO: Setting default auxiliaries to DC > > > Jul 12, 2006 11:20:34 AM > > > > > > > > org.apache.jcs.engine.control.CompositeCacheConfiguratorsetDefaultCompositeCacheAttributes > > > INFO: setting defaultCompositeCacheAttributes to > [ > > > useLateral = true, > > > useRemote = true, useDisk = true, maxObjs = > 1000, > > > maxSpoolPerRun = -1 ] > > > Jul 12, 2006 11:20:35 AM > > > > > > > > org.apache.jcs.engine.control.CompositeCacheConfiguratorsetDefaultElementAttributes > > > . > > > . > > > . > > > > > > > > > Warm Regards, > > > Rupesh K > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: > [EMAIL PROTECTED] > > For additional commands, e-mail: > [EMAIL PROTECTED] > > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]