Return-Path: Delivered-To: apmail-logging-log4j-user-archive@www.apache.org Received: (qmail 10539 invoked from network); 9 Sep 2008 16:29:17 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Sep 2008 16:29:17 -0000 Received: (qmail 42636 invoked by uid 500); 9 Sep 2008 16:29:08 -0000 Delivered-To: apmail-logging-log4j-user-archive@logging.apache.org Received: (qmail 42607 invoked by uid 500); 9 Sep 2008 16:29:08 -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 42596 invoked by uid 99); 9 Sep 2008 16:29:08 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Sep 2008 09:29:08 -0700 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 hoju@visi.com designates 208.42.176.222 as permitted sender) Received: from [208.42.176.222] (HELO g2host.com) (208.42.176.222) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Sep 2008 16:28:09 +0000 Received: from [162.136.192.1] (account hoju@visi.com) by mailback1.g2host.com (CommuniGate Pro WEBUSER 5.1.16) with HTTP id 11140881 for log4j-user@logging.apache.org; Tue, 09 Sep 2008 11:28:33 -0500 From: "Jacob Kjome" Subject: Re: [SPAM (Bayesain Analysis)] - Logger object and change filename - Bayesian Filter detected spam To: "Log4J Users List" X-Mailer: CommuniGate Pro WebUser v5.1.16 Date: Tue, 09 Sep 2008 11:28:33 -0500 Message-ID: In-Reply-To: References: <3FE38194C8A3334A959B64B7D9A1E27B6E3320@plejaden.seychelles.ergo> MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1;format="flowed" Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org Search the list for "MultiFileAppender" or something to the effect of per-thread logging based on MDC values. Jake On Tue, 9 Sep 2008 09:00:53 -0700 "Reza Razavipour" wrote: > Ok, let me explain more... > > I have a set of elements, a queue of them...I have a thread pool of > processors. A processor takes an element from the queue and logs some > information about them. So what I need to do is to log the information > about element XYZ to a file called XYZ.log and for element ABC to the > file ABC.log and on and on... > >>From the log4j.xml for the app, there is an appender called > AllElements, lets say. In addition to all element specific log files, > I need to log to this file also...Now what I need to do is to "clone". > If it is a rollingFileAppender the element specific log appender needs > to be the same, the pattern format should be the same, the only > difference is appender file name... > > So for each element, I need a brand new logger with appenders exactly > the same as the one defined in log4j.xml file, the only difference is > the filename for the appender, there is only one. > > Does this help at all clarify what I need to do? > > Thanks > Reza > > > > > On Tue, Sep 9, 2008 at 8:00 AM, Bender Heri wrote: >> Loggers do not have file names attached. Probably you mean a >> FileAppender. >> >> Each configured Appender is instantiated as singleton, even if it is >> attached to more than one Logger. >> >> Loggers are identified by a arbitrary String, commonly the FQCN. >> Therefore you cant clone a Logger which has the same name as the >> original. >> >> Explain more about your needs. Why do you have to clone it? >> >> Heri >> >>> -----Original Message----- >>> From: Reza Razavipour [mailto:reza.razavipour@gmail.com] >>> Sent: Monday, September 08, 2008 5:38 PM >>> To: Log4J Users List >>> Subject: [SPAM (Bayesain Analysis)] - Logger object and >>> change filename - Bayesian Filter detected spam >>> >>> All, >>> >>> I have a Logger object and I need to create a "clone" of it >>> and change its filename to a different name. How does one do that? >>> The idea here is that I have initialized a Logger instance >>> from log-4j.xml file. Now I need to create a new one, off of >>> it or clone and change the filename. Every attribute of the >>> new Logger instance should be whatever is in the file, only >>> filename is diifferent. >>> >>> Thanks in advance. >>> Reza >>> >>> --------------------------------------------------------------------- >>> 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 >> >> > > --------------------------------------------------------------------- > 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