Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@www.apache.org Received: (qmail 72733 invoked from network); 15 Sep 2004 16:43:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 15 Sep 2004 16:43:57 -0000 Received: (qmail 21994 invoked by uid 500); 15 Sep 2004 16:43:13 -0000 Delivered-To: apmail-jakarta-tomcat-user-archive@jakarta.apache.org Received: (qmail 21842 invoked by uid 500); 15 Sep 2004 16:43:12 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 21725 invoked by uid 99); 15 Sep 2004 16:43:10 -0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of hoju@visi.com designates 209.98.98.22 as permitted sender) Received: from [209.98.98.22] (HELO mail-out.visi.com) (209.98.98.22) by apache.org (qpsmtpd/0.28) with ESMTP; Wed, 15 Sep 2004 09:43:08 -0700 Received: from mehen.visi.com (mehen.visi.com [209.98.98.97]) by mail-out.visi.com (Postfix) with ESMTP id 4FE8136CB for ; Wed, 15 Sep 2004 11:46:28 -0500 (CDT) Received: from mehen.visi.com (localhost [127.0.0.1]) by mehen.visi.com (8.12.9/8.12.5) with ESMTP id i8FGh5VQ072858 for ; Wed, 15 Sep 2004 11:43:05 -0500 (CDT) (envelope-from hoju@visi.com) Received: (from www@localhost) by mehen.visi.com (8.12.9/8.12.5/Submit) id i8FGh5i8072857 for tomcat-user@jakarta.apache.org; Wed, 15 Sep 2004 11:43:05 -0500 (CDT) X-Authentication-Warning: mehen.visi.com: www set sender to hoju@visi.com using -f Received: from 162.136.192.1 ([162.136.192.1]) by my.visi.com (IMP) with HTTP for ; Wed, 15 Sep 2004 11:43:05 -0500 Message-ID: <1095266585.41487119940a9@my.visi.com> Date: Wed, 15 Sep 2004 11:43:05 -0500 From: Jacob Kjome To: Tomcat Users List Subject: Re: Serializable Logging implementation References: <414822C3.50003@joedog.org> In-Reply-To: <414822C3.50003@joedog.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit User-Agent: Internet Messaging Program (IMP) 3.2.5 X-Originating-IP: 162.136.192.1 X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Quoting Tim Funk : > logging instances should be static to the class. > > // Commons logging example but a log4j equiv should be easy to find > private static Log log = LogFactory.getLog(MyClass.class); > or private transient Log log = LogFactory.getLog(MyClass.class); Although this would mean a new instance of the log variable for every instance of the class. The static version is the better idea in most cases. Jake > > -Tim > > Antony Paul wrote: > > > Hi, > > I used Log4J and commons logging in an ActionForm which is stored in > the > > session. When I reload the context it is invalidating the session because > it > > is non serializable. Is there any work around for this ?. Or do I have to > > use any other Logger. > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-user-help@jakarta.apache.org