Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 82901 invoked from network); 9 Jun 2009 19:31:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 9 Jun 2009 19:31:59 -0000 Received: (qmail 92801 invoked by uid 500); 9 Jun 2009 19:32:06 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 92744 invoked by uid 500); 9 Jun 2009 19:32:06 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 92689 invoked by uid 99); 9 Jun 2009 19:32:04 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Jun 2009 19:32:04 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [194.103.159.79] (HELO mail.kgk.com) (194.103.159.79) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Jun 2009 19:31:55 +0000 X-IronPort-AV: E=Sophos;i="4.41,335,1241388000"; d="scan'208";a="15459559" Received: from unknown (HELO sthms02.kgk.ad) ([172.25.0.32]) by mail.kgk.com with ESMTP; 09 Jun 2009 21:31:35 +0200 Received: from sthms03.kgk.ad ([172.25.0.33]) by sthms02.kgk.ad ([172.25.0.32]) with mapi; Tue, 9 Jun 2009 21:31:35 +0200 From: "Imner, Andreas" To: "users@tomcat.apache.org" Date: Tue, 9 Jun 2009 21:31:44 +0200 Subject: Why do stacktraces from servlets print to stdout, when the other end up in the log4j -log file? Thread-Topic: Why do stacktraces from servlets print to stdout, when the other end up in the log4j -log file? Thread-Index: AcnpOOxesBvWKk4BRmazxeHwgFSDDQ== Message-ID: Accept-Language: sv-SE Content-Language: sv-SE X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: sv-SE Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org My companys web application uses log4j 1.2.8 for logging and have just rece= ntly switched from Weblogic to Tomcat 6.0.18. Since the we switched to Tomcat, when we do some logging within a servlet =20 " private static final Log log =3D LogFactory.getLog(ExceptionHandlerServlet.= class); log.error("some message, throwable); " The "some message" -line is written to the file specified by log4j, but why= does the stacktrace gets written to Tomcats stdout.log? This behaviour is for servlets only. For the other Java classes in the weba= pp, both the "some message" -line and the stacktrace is written to the file= specified by log4j. ___________________________________________________ Extra info The log -settings of Tomcat is the standard setup This is our log4j.properties file " log4j.appender.A1=3Dorg.apache.log4j.RollingFileAppender log4j.appender.A1.MaxBackupIndex=3D20 log4j.appender.A1.MaxFileSize=3D10MB log4j.appender.A1.layout=3Dorg.apache.log4j.PatternLayout log4j.appender.A1.layout.ConversionPattern=3D%d{ABSOLUTE} %-5p %X{ak} [%c{1= }] %m%n log4j.rootLogger=3DERROR, A1 log4j.category.se=3DINFO # All System.out.println is redirected to stdout logger, INFO level log4j.category.stdout=3DINFO # All System.err.println (includes Exception.printStackTrace() is redirecte= d to stderr logger, INFO level log4j.category.stderr=3DINFO " --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org