Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 35131 invoked from network); 29 Mar 2011 10:40:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 29 Mar 2011 10:40:58 -0000 Received: (qmail 67763 invoked by uid 500); 29 Mar 2011 10:40:57 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 67676 invoked by uid 500); 29 Mar 2011 10:40:57 -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 67668 invoked by uid 99); 29 Mar 2011 10:40:57 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Mar 2011 10:40:57 +0000 X-ASF-Spam-Status: No, hits=0.6 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of gary.tully@gmail.com designates 209.85.216.43 as permitted sender) Received: from [209.85.216.43] (HELO mail-qw0-f43.google.com) (209.85.216.43) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Mar 2011 10:40:51 +0000 Received: by qwf6 with SMTP id 6so15663qwf.2 for ; Tue, 29 Mar 2011 03:40:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=AVN/F5ZBeMnSnVcl4xh9B4NPfqOkEMjQB1C6hEW3IsA=; b=DUHtlkpUrylI1EskbrK/ZO0BibUjjQ3+jCEyFpMZUyprzRgJGlX8bv9qEyJFQuzt+Z I+lUaMtkmltHCsSJGIRhPMlwnnjfqoc2HOsSKkis8LXcREx3g1JV6cR1kj1VYRhiDpTV p28jD/EJ/c/JxZGcMbQeKNMyZGaTdWLaTaSbM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=i0Xsm0uaYC429mIhi5fpjWJ57QWXvIu4xM4nsNhKv7r4SZ0vra1yr/fHAXEZAmroRf lqbkoWQfg9u3BL+nJ/1/Vh5naz6z+9M5NFgnM57m4TfSejevRfgUbcMFXhPcH2Nk2VLr 9gmPccAwYvffBVrUVj612GLvH1GiyrYuvXc48= MIME-Version: 1.0 Received: by 10.229.51.132 with SMTP id d4mr3976112qcg.238.1301395230534; Tue, 29 Mar 2011 03:40:30 -0700 (PDT) Received: by 10.229.68.163 with HTTP; Tue, 29 Mar 2011 03:40:30 -0700 (PDT) In-Reply-To: <1301394726049-3414384.post@n4.nabble.com> References: <1301318822050-3411709.post@n4.nabble.com> <1301394726049-3414384.post@n4.nabble.com> Date: Tue, 29 Mar 2011 11:40:30 +0100 Message-ID: Subject: Re: Logging with ActiveMQ and Log4j From: Gary Tully To: users@activemq.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org > log4j: Handling log4j.additivity.org.apache.activemq=[null] is a little odd. Don't think ALL is a valid level, use TRACE instead, see: http://logging.apache.org/log4j/1.2/manual.html On 29 March 2011 11:32, Oli wrote: > Hi. Thanks for the advice, but it still is not working. > > My activemq.log file gets created, but remains empty throughout the runtime > of the application. > > Here is the output I get when I run the project with -Dlog4j.debug in the > jvm start command: > > log4j: Trying to find [log4j.xml] using context classloader > sun.misc.Launcher$AppClassLoader@11b86e7. > log4j: Trying to find [log4j.xml] using > sun.misc.Launcher$AppClassLoader@11b86e7 class loader. > log4j: Trying to find [log4j.xml] using ClassLoader.getSystemResource(). > log4j: Trying to find [log4j.properties] using context classloader > sun.misc.Launcher$AppClassLoader@11b86e7. > log4j: Using URL [file:/MY_DIRECTORY/build/classes/log4j.properties] for > automatic log4j configuration. > log4j: Reading configuration from URL > file:/MY_DIRECTORY/build/classes/log4j.properties > log4j: Parsing for [root] with value=[INFO, logfile]. > log4j: Level token is [INFO]. > log4j: Category root set to INFO > log4j: Parsing appender named "logfile". > log4j: Parsing layout options for "logfile". > log4j: Setting property [conversionPattern] to [%d [%-15.15t] %-5p > %-30.30c{1} -]. > log4j: End of parsing for "logfile". > log4j: Setting property [maxFileSize] to [1024KB]. > log4j: Setting property [append] to [true]. > log4j: Setting property [file] to [C:/OUTPUT_DIRECTORY/logs/activemq.log]. > log4j: Setting property [maxBackupIndex] to [5]. > log4j: setFile called: C:/OUTPUT_DIRECTORY/logs/activemq.log, true > log4j: setFile ended > log4j: Parsed "logfile" options. > log4j: Parsing for [org.apache.activemq] with value=[INFO]. > log4j: Level token is [INFO]. > log4j: Category org.apache.activemq set to INFO > log4j: Handling log4j.additivity.org.apache.activemq=[null] > log4j: Parsing for [org.apache.activemq.spring] with value=[INFO]. > log4j: Level token is [INFO]. > log4j: Category org.apache.activemq.spring set to INFO > log4j: Handling log4j.additivity.org.apache.activemq.spring=[null] > log4j: Parsing for [org.springframework] with value=[INFO]. > log4j: Level token is [INFO]. > log4j: Category org.springframework set to INFO > log4j: Handling log4j.additivity.org.springframework=[null] > log4j: Parsing for [org.apache.xbean.spring] with value=[INFO]. > log4j: Level token is [INFO]. > log4j: Category org.apache.xbean.spring set to INFO > log4j: Handling log4j.additivity.org.apache.xbean.spring=[null] > log4j: Parsing for [org.apache.camel] with value=[INFO]. > log4j: Level token is [INFO]. > log4j: Category org.apache.camel set to INFO > log4j: Handling log4j.additivity.org.apache.camel=[null] > log4j: Parsing for [org.apache.activemq.transport.InactivityMonitor] with > value=[INFO]. > log4j: Level token is [INFO]. > log4j: Category org.apache.activemq.transport.InactivityMonitor set to INFO > log4j: Handling > log4j.additivity.org.apache.activemq.transport.InactivityMonitor=[null] > log4j: Finished configuring. > > However, this only provides me with logging that I am manually doing in the > code, i.e. myLogger.error(""). > > This does not log to file the output that is generated by the broker or any > other general activemq output. Is there something that I need to to in code > as well for this to be activated? > > Regards, > > Oli > > -- > View this message in context: http://activemq.2283324.n4.nabble.com/Logging-with-ActiveMQ-and-Log4j-tp3411709p3414384.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. > -- http://blog.garytully.com http://fusesource.com