From users-return-25594-apmail-activemq-users-archive=activemq.apache.org@activemq.apache.org Mon Oct 04 23:04:10 2010 Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 67458 invoked from network); 4 Oct 2010 23:04:10 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 4 Oct 2010 23:04:10 -0000 Received: (qmail 17234 invoked by uid 500); 4 Oct 2010 23:04:10 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 17190 invoked by uid 500); 4 Oct 2010 23:04:09 -0000 Mailing-List: contact users-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@activemq.apache.org Delivered-To: mailing list users@activemq.apache.org Received: (qmail 17182 invoked by uid 99); 4 Oct 2010 23:04:09 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Oct 2010 23:04:09 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of slewis@fusesource.com designates 209.85.215.43 as permitted sender) Received: from [209.85.215.43] (HELO mail-ew0-f43.google.com) (209.85.215.43) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Oct 2010 23:04:03 +0000 Received: by ewy1 with SMTP id 1so3600416ewy.2 for ; Mon, 04 Oct 2010 16:03:43 -0700 (PDT) Received: by 10.213.17.133 with SMTP id s5mr7883852eba.21.1286233421391; Mon, 04 Oct 2010 16:03:41 -0700 (PDT) MIME-Version: 1.0 Received: by 10.213.31.140 with HTTP; Mon, 4 Oct 2010 16:03:21 -0700 (PDT) In-Reply-To: References: From: Stan Lewis Date: Mon, 4 Oct 2010 19:03:21 -0400 Message-ID: Subject: Re: activemq Log4j usage To: users@activemq.apache.org Content-Type: text/plain; charset=UTF-8 X-Virus-Checked: Checked by ClamAV on apache.org You can install and use Pax Logging for this - http://wiki.ops4j.org/display/paxlogging/Pax+Logging On Mon, Oct 4, 2010 at 5:24 PM, Navin Naidu wrote: > Hi, > > I am facing issues configuring log4j with activemq as osgi bundle, I have > created an osgi bundle of activemq Embedded broker and has log4j.properties > file in its classpath. > > It creates an empty log file, and prints the INFO on stdout (which is the > default logging behaviour). > > I have also tried passing the properties file as program argument : > -Dlog4j.configuration=/home/log4j.properties > > I have tried adding the properties file to the osgi bundle as well. > > Is there a different way to configure log4j with osgi ? > > log4j.properties: > > log4j.rootLogger=INFO,DEBUG,FILE > log4j.appender.FILE=org.apache.log4j.DailyRollingFileAppender > log4j.appender.FILE.file=logs/sample.log > log4j.appender.FILE.append=true > log4j.appender.FILE.layout=org.apache.log4j.PatternLayout > log4j.appender.FILE.layout.ConversionPattern=%d{ISO8601} %-5p %c{3} - %m%n > #Roll Over Every Midnight > log4j.appender.FILE.datePattern='.'yyyy-MM-dd > > > -- > Thanks & Regards, > > - Navin >