Return-Path: Delivered-To: apmail-logging-log4j-user-archive@www.apache.org Received: (qmail 52137 invoked from network); 14 Dec 2005 05:20:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 14 Dec 2005 05:20:33 -0000 Received: (qmail 42029 invoked by uid 500); 14 Dec 2005 05:20:29 -0000 Delivered-To: apmail-logging-log4j-user-archive@logging.apache.org Received: (qmail 41994 invoked by uid 500); 14 Dec 2005 05:20:28 -0000 Mailing-List: contact log4j-user-help@logging.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Log4J Users List" Reply-To: "Log4J Users List" Delivered-To: mailing list log4j-user@logging.apache.org Received: (qmail 41983 invoked by uid 99); 14 Dec 2005 05:20:27 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Dec 2005 21:20:27 -0800 X-ASF-Spam-Status: No, hits=1.4 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: 216.148.227.85 is neither permitted nor denied by domain of hoju@visi.com) Received: from [216.148.227.85] (HELO rwcrmhc12.comcast.net) (216.148.227.85) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Dec 2005 21:20:26 -0800 Received: from nicki.visi.com (c-66-41-141-26.hsd1.mn.comcast.net[66.41.141.26]) by comcast.net (rwcrmhc12) with SMTP id <20051214052004014008h686e>; Wed, 14 Dec 2005 05:20:04 +0000 Message-Id: <5.2.1.1.0.20051213205024.0357ce90@127.0.0.1> X-Sender: hoju@127.0.0.1 X-Mailer: QUALCOMM Windows Eudora Version 5.2.1 Date: Tue, 13 Dec 2005 23:18:54 -0600 To: "Log4J Users List" From: Jacob Kjome Subject: Re: log4j-1.3alpha-7 - config load/reload? and watchdog? In-Reply-To: <72AB874F99785949A2898773AEDB5ED8022184A4@seams043.starbuck s.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Relayed-By: GPGrelay Version 0.959 (Win32) X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N At 12:16 PM 12/13/2005 -0800, you wrote: >I'm trying to upgrade to log4j-1.3alpha-7, but not seeing what I would >expect...which is hopefully user error. > >First, I thought I could replace my call to >DOMConfigurator.configureAndWatch(, >); > >With: > >JoranConfigurator joran = new JoranConfigurator(); >joran.doConfigure(, >LogManager.getLoggerRepository()); > This should work fine, but I haven't verified this lately. I know it used to work. >However, I don't see log events being sent to my appender. Inserting >the following: System.setProperty("log4j.configuration", >); >Forces the events to the log file appender I've set up. > You may want to report a bug on this in Apache's Bugzilla. >Secondly, how do I force a reload of the config? > Look into the watchdogs. I haven't really used them, so I can't give much direction. Maybe Mark Womack can help since he was pretty heavily involved in their design? Otherwise, you can use something like LogWeb to have a manual updating process. You can even upload config files. Unfortunately, LogWeb doesn't build against Log4j-1.3 without a couple tweaks. I keep meaning to create a patch and send it to the developer of LogWeb. Makes it run with either Log4j-1.2.xx or Log4j-1.3. >Third and finally can I specify any other a %d conversion specifier in >the FileNamePattern param for the TimeBasedRollingPolicy? I have two >server that I'd like to share the same log4j config, but I'd like the >server log files to go to two different directories. Ideally I could >specify the following (where %s{server.name} is a jvm system property >that evaluates to "server1" for one server and "server2" from another >jvm): > Just use ${server.name}. That will work just fine. >class="org.apache.log4j.rolling.RollingFileAppender"> > class="org.apache.log4j.rolling.TimeBasedRollingPolicy"> > value="/var/tmp/%s{server.name}/server.%d{yyyy-MM-dd}.log.gz"/> > > > > > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org >For additional commands, e-mail: log4j-user-help@logging.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org For additional commands, e-mail: log4j-user-help@logging.apache.org