Return-Path: Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 86853 invoked from network); 1 Aug 2003 16:57:32 -0000 Received: from unknown (HELO mustang.mpi.com) (63.244.250.132) by daedalus.apache.org with SMTP; 1 Aug 2003 16:57:32 -0000 Received: from lightning.mpi.com (lightning.mpi.com [63.244.252.11]) by mustang.mpi.com (Switch-2.2.6/Switch-2.2.6) with ESMTP id h71Guk618258 for ; Fri, 1 Aug 2003 12:56:46 -0400 (EDT) Received: from US-VS1.corp.mpi.com ([63.244.252.32]) by lightning.mpi.com (Switch-3.0.4/Switch-3.0.0) with ESMTP id h71GvN68004460 for ; Fri, 1 Aug 2003 12:57:30 -0400 (EDT) X-MimeOLE: Produced By Microsoft Exchange V6.0.6375.0 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: Servlets & JSPs log to different files Date: Fri, 1 Aug 2003 12:57:30 -0400 Message-ID: <9C5166762F311146951505C6790A9CF8A6E92E@US-VS1.corp.mpi.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Servlets & JSPs log to different files Thread-Index: AcNYTbLP4FSYlPWBQum5V/qtP8x4sgAABxeA From: "Shapira, Yoav" To: "Tomcat Users List" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Howdy, >What is standard/recomended approach to getting my servlets and JSPs = to log >to >the same file. > >I am currently using the context logger in server.xml as follows: > > >crossContext=3D"true"> >suffix=3D".txt" timestamp=3D"true"/> > > >My JSP logs into /var/log/tomcat/ai_log.2003-08-01.txt >But my servlets log into /var/log/tomcat/catalina.out How are you logging in your servlets? Are you using System.out/System.err? If so, don't use them, and instead use the ServletContext#log(..) methods. Output from the servlet context log methods will end up in your context logger, ai_log... above. Alternatively, use a logging kit like log4j and have both your JSPs an= d servlets use it. Yoav Shapira This e-mail, including any attachments, is a confidential business com= munication, and may contain information that is confidential, propriet= ary and/or privileged. This e-mail is intended only for the individua= l(s) to whom it is addressed, and may not be saved, copied, printed, d= isclosed or used by anyone else. If you are not the(an) intended reci= pient, please immediately delete this e-mail from your computer system= and notify the sender. Thank you.