logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vladimer Shioshvili <vshioshv...@qrc.com>
Subject Re: tomcat and log4j, again
Date Thu, 03 Jul 2003 17:09:42 GMT
PS. WRAX press' Tomcat book has a section on Log4J. Pretty simple, 20 pages 
tops, but it will get you started. If you can get a handle of that, of course.

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.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?
>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: log4j-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: log4j-user-help@jakarta.apache.org

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: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org

View raw message