Return-Path: Delivered-To: apmail-logging-log4j-user-archive@www.apache.org Received: (qmail 55739 invoked from network); 20 May 2009 15:11:52 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 20 May 2009 15:11:52 -0000 Received: (qmail 39916 invoked by uid 500); 20 May 2009 15:12:05 -0000 Delivered-To: apmail-logging-log4j-user-archive@logging.apache.org Received: (qmail 39850 invoked by uid 500); 20 May 2009 15:12:05 -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 39839 invoked by uid 99); 20 May 2009 15:12:05 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 May 2009 15:12:05 +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 (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 May 2009 15:11:55 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1M6nS9-0003ON-Ox for log4j-user@logging.apache.org; Wed, 20 May 2009 08:11:33 -0700 Message-ID: <23637185.post@talk.nabble.com> Date: Wed, 20 May 2009 08:11:33 -0700 (PDT) From: power97 To: log4j-user@logging.apache.org Subject: RE: Dynamic File Name and Turn off File Logging In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: cjob68@shaw.ca References: <23635686.post@talk.nabble.com> <06BA3262D918014F9183B66425D5A8D463C3C2E921@no-sv-03.ketech.local> <23636539.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org I'm setting it right in the log4j.properties file. I'm thinking it won't be a big deal to just move the log4j outside the JAR file and change it when on Unix. Even if I set the value in batch script on windows and unix I still have to manually set the values so setting it in the log4j.properties maybe isn't anymore work. Douglas E Wegscheid wrote: > > how are you setting it now? inside your program, or in the configuration? > > you have a number of options: programmatically you can determine what OS > you are on and set it accordingly. You can set it appropriately as a > system property from whatever script or batch file you are invoking the > program from ( set -DLOG4J_NULL=/dev/null and the ${LOG4J_NULL} in your > config. > > options limited by imagination... > > Douglas E Wegscheid > Lead Technical Analyst, Whirlpool Corporation > (269)-923-5278 > > "A wrong note played hesitatingly is a wrong note. A wrong note played > with conviction is interpretation." > > > > > > power97 > 05/20/2009 10:25 AM > Please respond to > "Log4J Users List" > > > To > log4j-user@logging.apache.org > cc > > Subject > RE: Dynamic File Name and Turn off File Logging > > > > > > > > How do I do that ? It does need to run on Windows and Unix. > > > > Michael Erskine wrote: >> >>> This works fine in Windows >>> but when run on Unix it actually creates a file called "nul". >> >> That's because what you're doing is Windows specific. Fix that if you > need >> a cross-platform configuration. >> >> Regards, >> Michael Erskine >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org >> For additional commands, e-mail: log4j-user-help@logging.apache.org >> >> >> > > -- > View this message in context: > http://www.nabble.com/Dynamic-File-Name-and-Turn-off-File-Logging-tp23635686p23636539.html > > Sent from the Log4j - Users mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org > For additional commands, e-mail: log4j-user-help@logging.apache.org > > > > -- View this message in context: http://www.nabble.com/Dynamic-File-Name-and-Turn-off-File-Logging-tp23635686p23637185.html Sent from the Log4j - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org For additional commands, e-mail: log4j-user-help@logging.apache.org