Thanks, PQ. Is it just a matter of getting the log4j.properties file right? Almost seems like it isn't even getting acknowledged. I tried a number of log4j.properties file variations, as well as what was listed in the "short introduction to Log4j". For example ...
log4j.rootLogger=DEBUG, A1 log4j.appender.A1.layout=org.apache.log4j.PatternLayout # Print the date in ISO 8601 format log4j.appender.A1.layout.ConversionPattern=%d [%t] %-5p %c - %m%n # Print only messages of level WARN or above in the package com.foo. log4j.logger.org.apache.struts=WARN and then this one ... log4j.rootLogger=DEBUG, stdout, R log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.layout=org.apache.log4j.PatternLayout log4j.appender.stdout.Target=System.out log4j.appender.stdout.Threshold=WARN log4j.appender.stdout.org.apache.struts=WARN # Pattern to output the caller's file name and line number. log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) - %m%n log4j.appender.R=org.apache.log4j.RollingFileAppender log4j.appender.R.File=c:/temp/testlogfile.txt log4j.appender.R.MaxFileSize=100KB # Keep one backup file log4j.appender.R.MaxBackupIndex=1 log4j.appender.R.layout=org.apache.log4j.PatternLayout log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n then even used your exact properties file, with my file of course, and I don't seem to be getting anywhere. I excepted to see less messages printing out to the console, and nothing is changing. I also didn't see any messages printing to the log file I specified. It seems so straight forward, but I must not be understanding something about how it all works. Susan Bradeen On 02/07/2003 11:53:34 AM pqin wrote: > # A multi-destination logger > # FATAL will go to the console > # All will go to a file > log4j.logger.mylogger=DEBUG, fatalconsole, file > > # All fatal messages will log to the console: System.out > log4j.appender.fatalconsole=org.apache.log4j.ConsoleAppender > log4j.appender.fatalconsole.Target=System.out > log4j.appender.fatalconsole.Threshold=FATAL > > # All messages go to a file rolled over twice per day > log4j.appender.file=org.apache.log4j.DailyRollingFileAppender > log4j.appender.file.File=c:/Program Files/Apache Group/Tomcat > 4.1/logs/localhost_lciponline_debug.txt > log4j.appender.file.DatePattern='.'yyyy-MM-dd-a > log4j.appender.file.Threshold=DEBUG > > > Regards, > > > PQ > > "This Guy Thinks He Knows Everything" > "This Guy Thinks He Knows What He Is Doing" > > -----Original Message----- > From: Susan Bradeen [mailto:[EMAIL PROTECTED]] > Sent: February 7, 2003 11:53 AM > To: Struts Users Mailing List > Subject: RE: Another logging question > > Yes, thank you. I was under the impression that you could set the logging > level to WARN or something and not see all the INFO messages in the > console. Despite my efforts to change this level, I still see all messages > as if the level were set to DEBUG. Sorry if I didn't make my question > clear. > > Susan Bradeen > > On 02/07/2003 11:34:14 AM pqin wrote: > > > If you use ConsoleAppender, of course you see messages on the screen. > > > > Regards, > > > > > > PQ > > > > "This Guy Thinks He Knows Everything" > > "This Guy Thinks He Knows What He Is Doing" > > > > -----Original Message----- > > From: Susan Bradeen [mailto:[EMAIL PROTECTED]] > > Sent: February 7, 2003 11:34 AM > > To: [EMAIL PROTECTED] > > Subject: Another logging question > > > > I apologize in advance for yet another logging question to the group, > but > > I cannot get this to work. I am getting anything and everything printing > > to my console. I couldn't seem to make logging level changes using the > > default SimpleLog, so today I moved on to Log4j. I am using Struts > 1.1b3, > > and J2SE 1.3.x. > > > > 1) downloaded the most recent Log4j.zip > > 2) put the log4j-1.2.7.jar in my WEB-INF/lib folder. > > 3) rebuilt my web project. > > 4) created two properties files ( WEB-INF/classes) ... > > commons-logging.properties and log4j.properties > > 5) added to commons-logging.properties > > > > > org.apache.commons.logging.LogFactory=org.apache.commons.logging.impl.Log4jF > > actory > > > > 6) added to log4j.properties (just like everyone else) > > # Set root logger level to DEBUG and its only appender to A1. > > log4j.rootLogger=WARN,A1 > > > > # A1 is set to be a ConsoleAppender. > > log4j.appender.A1=org.apache.log4j.ConsoleAppender > > > > # A1 uses PatternLayout. > > log4j.appender.A1.layout=org.apache.log4j.PatternLayout > > log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n > > > > log4j.logger.org.apache.struts=WARN > > > > 7) restarted my server instance and tried my web application (over and > > over again). > > > > I think I have been through every logging related message in the > archives > > and all the docs on line, but I absolutely don't see what I am > forgetting. > > I hope someone else can shed some light on this. > > > > Thanks, > > > > Susan Bradeen > > [EMAIL PROTECTED] > > > > > > --------------------------------------------------------------------- > > 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] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

