Return-Path: Delivered-To: apmail-ws-axis-user-archive@www.apache.org Received: (qmail 74367 invoked from network); 21 Jul 2006 14:52:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 21 Jul 2006 14:52:01 -0000 Received: (qmail 12949 invoked by uid 500); 21 Jul 2006 14:51:54 -0000 Delivered-To: apmail-ws-axis-user-archive@ws.apache.org Received: (qmail 12712 invoked by uid 500); 21 Jul 2006 14:51:54 -0000 Mailing-List: contact axis-user-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-user@ws.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-user@ws.apache.org Received: (qmail 12701 invoked by uid 99); 21 Jul 2006 14:51:53 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Jul 2006 07:51:53 -0700 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of robertlazarski@gmail.com designates 64.233.182.188 as permitted sender) Received: from [64.233.182.188] (HELO nf-out-0910.google.com) (64.233.182.188) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Jul 2006 07:51:53 -0700 Received: by nf-out-0910.google.com with SMTP id a4so836544nfc for ; Fri, 21 Jul 2006 07:51:31 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Z77TYVuCF/0cmrGokoazKKqqoYBTrKDkcBqG2q4c4xi2cW+ThP4ce/KN2BFvtHOT1K2m8btuSRvvEeGjXPXe6DO4/hZozFNMZkV0mudYajelQWoNmVwfGQ3TNaSBdZ62lC/JSdZ1g32tPGOVrIoHFqjcW7Jj90mUuEAVyZGKbWA= Received: by 10.49.8.15 with SMTP id l15mr699134nfi; Fri, 21 Jul 2006 07:51:31 -0700 (PDT) Received: by 10.49.9.19 with HTTP; Fri, 21 Jul 2006 07:51:31 -0700 (PDT) Message-ID: Date: Fri, 21 Jul 2006 11:51:31 -0300 From: "robert lazarski" To: axis-user@ws.apache.org Subject: Re: [Axis2] log4j configuration issue In-Reply-To: <8992B0F2-D273-4454-837E-F1EFDF5DA138@ncl.ac.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <44BF8470.9050503@ncl.ac.uk> <44C086B2.3090206@ncl.ac.uk> <8992B0F2-D273-4454-837E-F1EFDF5DA138@ncl.ac.uk> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Log4j automatically looks for properties files in the classloader. You can configure log4j to look for its config as you did, but it does have some default locations to look for it. HTH, Robert http://www.braziloutsource.com/ On 7/21/06, Michele Mazzucco wrote: > And what about the logging configuration? The > PropertyConfiguration.configure() call needs an argument: what do you > pass to it? Or you don't need that call? > > Michele > > On 21 Jul 2006, at 13:19, robert lazarski wrote: > > > That's the hard way ;-) . I typically put log4j.jar in my WEB-INF/lib > > as the classloader issues can get tricky. If you put the contents of > > this in your log4j properties under WEB-INF/classes, log4j will find > > it and you'll get debug output into catalina.out : > > > > > > ##################INICIO DOS APPENDERs################################ > > > > #-------------------------------------------------------------------# > > #-------------------------------------------------------------------# > > > > # console2 ser=E1 um appender de console que exibir=E1 todas as > > propriedades > > log4j.appender.console2=3Dorg.apache.log4j.ConsoleAppender > > > > log4j.appender.console2.layout=3Dorg.apache.log4j.PatternLayout > > log4j.appender.console2.layout.ConversionPattern=3D%d [%c] - %m%n > > > > #-------------------------------------------------------------------# > > #################INICIO DO ROOTlOGGER################################ > > > > log4j.rootLogger=3DDEBUG, console2 > > > > ###################FIM DO ROOTlOGGER################################ > > > > > > #############INICIO DAS DECLARA=C7=D5ES DE CATEGORIAS##################= ## > > > > log4j.category.org.apache=3DDEBUG, console2 > > > > HTH, > > Robert > > http://www.braziloutsource.com/ > > > > > > On 7/21/06, Michele Mazzucco wrote: > >> Robert, > >> > >> robert lazarski wrote: > >> > WEB-INF/classes . > >> > >> I've tried it, but unfortunately it didn't work. Instead, I've > >> fixed the > >> problem this way: > >> > >> 1 - I've put log4j.properties into the archive root > >> > >> 2 - I got the class loader for the service class > >> ClassLoader loader =3D EntropyAnalyserService.class.getClassLoader(); > >> > >> 3 - Using the class loader, I got the url to the file (from the root) > >> URL url =3D loader.getResource("/log4j.properties"); > >> > >> > >> Make sure you have log4j.jar under WEB-INF/lib or > >> > another appropriate place. > >> > >> > >> Since log4j.jar is in $CATALINA_HOME/common/lib I don't need to > >> include > >> it into WEB-INF/lib, do I? > >> > >> Thanks, > >> Michele > >> > >> > > >> > HTH, > >> > Robert > >> > http://www.braziloutsource.com/ > >> > > >> > On 7/20/06, Michele Mazzucco wrote: > >> >> Hi all, > >> >> > >> >> where should I put the log4j.properties file into my axis2 web > >> service? > >> >> And how do I locate it? > >> >> > >> >> > >> >> Thanks in advance, > >> >> Michele > >> >> > >> >> > >> --------------------------------------------------------------------- > >> >> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org > >> >> For additional commands, e-mail: axis-user-help@ws.apache.org > >> >> > >> >> > >> > > >> > > >> --------------------------------------------------------------------- > >> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org > >> > For additional commands, e-mail: axis-user-help@ws.apache.org > >> > > >> > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org > >> For additional commands, e-mail: axis-user-help@ws.apache.org > >> > >> > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org > > For additional commands, e-mail: axis-user-help@ws.apache.org > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org > For additional commands, e-mail: axis-user-help@ws.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org For additional commands, e-mail: axis-user-help@ws.apache.org