Return-Path: X-Original-To: apmail-tomcat-users-archive@www.apache.org Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8C7119CD6 for ; Fri, 20 Apr 2012 19:48:19 +0000 (UTC) Received: (qmail 94756 invoked by uid 500); 20 Apr 2012 19:48:16 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 94709 invoked by uid 500); 20 Apr 2012 19:48:16 -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 94699 invoked by uid 99); 20 Apr 2012 19:48:16 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Apr 2012 19:48:15 +0000 X-ASF-Spam-Status: No, hits=0.9 required=5.0 tests=PLING_QUERY,RCVD_IN_DNSWL_NONE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [76.96.59.227] (HELO qmta12.westchester.pa.mail.comcast.net) (76.96.59.227) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Apr 2012 19:48:09 +0000 Received: from omta18.westchester.pa.mail.comcast.net ([76.96.62.90]) by qmta12.westchester.pa.mail.comcast.net with comcast id 0Gjn1j0021wpRvQ5CKnppx; Fri, 20 Apr 2012 19:47:49 +0000 Received: from Christophers-MacBook-Pro.local ([69.143.109.145]) by omta18.westchester.pa.mail.comcast.net with comcast id 0Knn1j01d38FjT13eKno5R; Fri, 20 Apr 2012 19:47:48 +0000 Message-ID: <4F91BD64.3070808@christopherschultz.net> Date: Fri, 20 Apr 2012 15:47:48 -0400 From: Christopher Schultz User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:11.0) Gecko/20120327 Thunderbird/11.0.1 MIME-Version: 1.0 To: Tomcat Users List Subject: Re: catalina.out file is growing very rapidly! How to prevent Hibernate's INFO and DEBUG statements from getting added to catalina.out file? References: In-Reply-To: X-Enigmail-Version: 1.4 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Dilip, On 4/20/12 12:43 PM, Dilip Shah wrote: > The following provides clarifications / details on the environments > in which the application is developed and then hosted: (quite a bit > of detail but I'm hoping this will help get to the root of the > issue) > > Develop environment: ================= * Windows XP SP3 You should upgrade, eventually. IIRC, Microsoft just extended support for WinXP (again) but it's quite long in the tooth. > * Tomcat version information: C:\apache-tomcat-5.5.25\bin>version > Server version: Apache Tomcat/5.5.25 Same here. 5.5.x will reach end-of-life in September 2012. It's time to start testing your applications with a new version of Tomcat. I recommend skipping all the way up to 7.0.x. > * There is a log4j.properties file in > CATALINA_HOME\common\classes\ (attached as > log4j.properties.dev.tomcat) This will confuse things. > * There is a log4j.properties file in the application's > WEB-INF\classes\ (attached as log4j.properties.dev.application) This is where this file belongs. > * jar files in the application's WEB-INF\lib folder: Directory of > C:\apache-tomcat-5.5.25\webapps\SmartCloudLearningMobi\WEB-INF\lib > 09/11/2009 05:35 PM 60,841 commons-logging-1.1.1.jar > 05/19/2009 01:51 PM 391,834 log4j-1.2.15.jar This is where log4j.jar belongs. Are you also using commons-logging in your own webapp -- or does some component require it? If not, remove it because it will just cause confusion. (Note that many Apache libraries do require commons-logging). > * log4j-1.2.15.jar is also in CATALINA_HOME\common\lib\ This will confuse things. If all is as it should be, the libraries in common/lib and the log4j.properties file in common/classes should both be ignored if you are initializing log4j from within your own webapp (are you? or is some other component initializing it?): the ClassLoader should be loading resources from WEB-INF/classes and WEB-INF/lib before it tries to load from common/*. If you are using a library stored in common/lib or a class in common/classes that is initializing log4j, then you may be getting both the common library and the common configuration loaded, depending on exactly how the initialization is done. Would it be possible to remove everything from common/*? It seemed like a good idea at the time, but common/* turns out to be a really bad idea for a number of reasons. > *** The problem I'm trying to solve does not exist in the > development environment!!! *** Obviously, there is some difference. What are those differences? > - note that here also, I have the Spring and Hibernate related jar > files that I suspect are adding these INFO and DEBUG entries in > CATALINA_HOME\common\lib\ Stop doing that. If you use Hibernate directly in your app (or Spring does it for you, which is more likely) then these libraries ought to be in WEB-INF/lib. > Question: * where are the other files such as > admin.2012-04-20.log, catalina.2012-04-20.log, etc configured? If you are using JULI, then they should be configured in logging.properties. Read the "Logging" section of the User's Guide for details. Note that this is "server" logging and not application logging. > Question: * who could be responsible for creating and configuring > catalina.out file on the Linux sever? Where do I look? As Konstantin says under separate cover, catalina.out is redirected stdout. The only place that filename should appear is in bin/catalina.sh. - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk+RvWQACgkQ9CaO5/Lv0PCdGQCgghtjinWYH4z2I46la7SI7NwI YNsAn3QT7qKbojGkAc40UdeBiELbqY8X =wMTJ -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org