Return-Path: Delivered-To: apmail-db-torque-user-archive@www.apache.org Received: (qmail 49000 invoked from network); 30 Jul 2008 15:29:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 30 Jul 2008 15:29:57 -0000 Received: (qmail 84700 invoked by uid 500); 30 Jul 2008 15:29:52 -0000 Delivered-To: apmail-db-torque-user-archive@db.apache.org Received: (qmail 84672 invoked by uid 500); 30 Jul 2008 15:29:52 -0000 Mailing-List: contact torque-user-help@db.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Apache Torque Users List" Reply-To: "Apache Torque Users List" Delivered-To: mailing list torque-user@db.apache.org Received: (qmail 84661 invoked by uid 99); 30 Jul 2008 15:29:52 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Jul 2008 08:29:52 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of shinkan@gmail.com designates 64.233.182.189 as permitted sender) Received: from [64.233.182.189] (HELO nf-out-0910.google.com) (64.233.182.189) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Jul 2008 15:28:57 +0000 Received: by nf-out-0910.google.com with SMTP id g16so32464nfd.15 for ; Wed, 30 Jul 2008 08:29:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type:references; bh=GIWsa592XEO8Bbtd80UjvOp65xHxpt0P6edxUGcU/ZM=; b=IgTSm19aBu+RPbOYzwKyF1J4AM6hhZXo3XagA0l9VfYtd3JPfqWCnHkDwjeJEbDiUs S5EfdCVByxcllfTvBlyJzlUX8/Kjy0kZZ6aTgXO2SwZGBjp/SSc5Bw0EfJRWclLm9YnB /YbIHufv3j/+QxUadvPxeoVYdQHX6R7yK5MlQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:references; b=LKDCtoAONa6p9oIP/+0M1HGPBf4Qz4bGq1b+h6gSSqMBBa9kVLAx9UOtyEwj2T9PO+ HhUJw+P1565mcuJg7Ea/motod/K2Nw1fBtq2qB7w6XoV+fxXIj6mN/mDxXd3sydoT8Iv CEhiU1OepAxKYuV8HP+mhbJrPG3k9GTmKEn40= Received: by 10.210.30.10 with SMTP id d10mr828335ebd.86.1217431745501; Wed, 30 Jul 2008 08:29:05 -0700 (PDT) Received: by 10.210.43.7 with HTTP; Wed, 30 Jul 2008 08:29:05 -0700 (PDT) Message-ID: <166af1cf0807300829g26bdc407g510fb78518c2bea7@mail.gmail.com> Date: Wed, 30 Jul 2008 17:29:05 +0200 From: Shinkan To: "Apache Torque Users List" Subject: Re: Log4J + Torque ... gonna drive me mad. In-Reply-To: <151178.66078.qm@web54602.mail.re2.yahoo.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_30813_26904481.1217431745484" References: <151178.66078.qm@web54602.mail.re2.yahoo.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_30813_26904481.1217431745484 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline Maybe I should have precised that I run a standalone app .. so no application server :] Thanks, anyway, that's a pretty hack. On Wed, Jul 30, 2008 at 17:19, Adam Allgaier wrote: > We created our own servlet to initiate the logger: > > > > log4j-init > com.foo.bar.Log4jInit > > > log4j-init-file > WEB-INF/logger.conf > > > 1 > > > > public class Log4jInit extends HttpServlet { > > public > void init() { > String prefix = getServletContext().getRealPath("/"); > //set the system property for the logging path > System.setProperty("logPath",prefix+"WEB-INF/logs"); > String file = getInitParameter("log4j-init-file"); > // if the log4j-init-file is not set, then no point in trying > if(file != null) { > PropertyConfigurator.configure(prefix+file); > } > }//init() > > }//class > > > > > > > ----- Original Message ---- > From: Shinkan > To: Apache Torque Users List > Sent: Wednesday, July 30, 2008 10:07:40 AM > Subject: Re: Log4J + Torque ... gonna drive me mad. > > Thanks for your quick answering ! > > But I tried. > With something (kinda, don't remember) like > org.apache.log4j.PropertyConfigurator.loadProperties( myPropertiesFilePath > ); > But if failed the same way. > > And why Torque documentation and defaut Torque.properties file talks about > embedding log4j properties on Torque.properties ? > Is this just about the convienience of maintaining and loading the same > file > on 2 properties loaders ? > > On Wed, Jul 30, 2008 at 17:01, Thomas Fischer > wrote: > > > Torque does not initialize log4j. Initialize log4j yourself and it will > > work. > > > > Thomas > > > > > Hi everyone ! > > > > > > I'm trying to make Torque logging working through LOG4J, as it's > > apparently > > > the only reliable solution (I would have used the native Java Logger > > > interface :'( ). > > > I've tried many many many Google's answers requesting about "torque > > > logging", "torque log4j", "log4j" and more, and I still fail. > > > > > > I now have this configuration .properties section, which is embedded in > > the > > > Torque.properties (which is by the way correctly loaded by > > Torque.init(...)) > > > : > > > > > > log4j.category.default = ALL, default > > > log4j.appender.default = org.apache.log4j.RollingFileAppender > > > log4j.appender.default.file = log/data.log > > > log4j.appender.default.layout = org.apache.log4j.PatternLayout > > > log4j.appender.default.layout.conversionPattern = %d [%t] %-5p %c - > %m%n > > > log4j.appender.default.maxBackupIndex = 5 > > > log4j.appender.default.maxFileSize = 5MB > > > log4j.appender.default.append = true > > > > > > Is Torque supposed to init LOG4J at Torque.init( filePath ) phase ? > > > How could I proceed ? > > > I always get this message at app's startup : > > > log4j:WARN No appenders could be found for logger > > > (org.apache.torque.TorqueInstance). > > > log4j:WARN Please initialize the log4j system properly. > > > Thus, I've got absolutely no log ... > > > > > > Please, help :'( > > > > > > Many thanks in advance. > > > > > > > > > -- > > > Pierre. > > > Some people, when confronted with a problem, think "I know, I'll use > > XML". > > > Now they have two problems. -- Jamie Zawinski / James Robertson > > > > > > -- > Pierre. > Some people, when confronted with a problem, think "I know, I'll use XML". > Now they have two problems. -- Jamie Zawinski / James Robertson > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org > For additional commands, e-mail: torque-user-help@db.apache.org > > -- Pierre. Some people, when confronted with a problem, think "I know, I'll use XML". Now they have two problems. -- Jamie Zawinski / James Robertson ------=_Part_30813_26904481.1217431745484--