At 12:54 PM 7/3/2003, you wrote:
OK, with my current configuration, I *am* seeing output in catalina.out. However, its not formatted the way I (think I) told it to. Also, I would prefer to have the output go to a separate log file, as there is just too much stuff in catalina.out to wade through.
Anyway, I am using RH9, jakarta-tomcat-4.1.24, and log4j-1.2.8. For my webapp, I am creating a war file that has log4j.properties in the WEB-INF/classes directory. I dropped log4j-1.2.8.jar into the WEB-INF/lib directory.
The log4j.properties file looks like this:
log4j.logger.fermataintl.migrasponder=DEBUG, console log4j.appender.console=org.apache.log4j.ConsoleAppender log4j.appender.console.layout=org.apache.log4j.PatternLayout log4j.appender.console.layout.ConversionPattern=%d [%t] %-5p %F:%L - %m%n =================================================================
I am not explicitly initializing log4j. A class that I am using in my app invokes logging as follows:
package fermataintl.migrasponder.common; import java.sql.*; import org.apache.log4j.*;
public class Vendor { ... logger.warn("attempt to authenticate '" + id + "' failed"); ... private static Logger logger = Logger.getLogger(Vendor.class); } ==================================================================
When I run my app and exercise the bit of code containing the warning above, it puts the following in catalina.out:
1571947 [Thread-5] WARN common.Vendor - attempt to authenticate 'xxx' failed =================================================================== So... my questions are:
1) How do I get output to a file of my own choosing 2) How do I get the formatting to come out with date and time prepended?
Thanks. Dean Hoover
PS. I looked for the commercial manual (on the website) at 2 local bookstores and on amazon.com. Nobody has it. I hesitate to order from
Switzerland, as I am in the US. How long would that take...
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
________________ Vladimer Shioshvili
QRC Division of Macro International Inc. 7315 Wisconsin Avenue, Suite 400W Bethesda, MD 20814
Phone: (301) 657 3077 ext. 155
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]