Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!.POSTED!not-for-mail From: Lew Newsgroups: comp.lang.java.programmer Subject: Re: Inherit logging properties in ja custom jar library? Date: Tue, 26 Apr 2011 11:38:12 -0400 Organization: albasani.net Lines: 21 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.albasani.net q7rzI4oZRC208PTXxMbMR2e+/nQnOVb6FbKTo2ITFTkpKjTBCOlkRl3tCdKHePppXqWC8X6gZR0HTuTn8KqmMg== NNTP-Posting-Date: Tue, 26 Apr 2011 15:38:06 +0000 (UTC) Injection-Info: news.albasani.net; logging-data="2BvdqJX+yq1IgApjfBzE4zkka0anhfBLuw0OGwWXGxKmoPsPptwTh4C+Lr7+mZv6M68FWLhYUtmbcB0d07v9B40/pVuVZ410xUd5r56KA3AqgQu347aSIRsazf3kLJ3O"; mail-complaints-to="abuse@albasani.net" User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.14) Gecko/20110223 Thunderbird/3.1.8 In-Reply-To: Cancel-Lock: sha1:+4wgFDLHwdIKAP5vYRX6YkThSSU= Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:3271 John Smith wrote: > Lew wrote: >> Have you tried this? Why not? What happened when you did? >> > > If I specifically put log4j.properties inside the jar file than both the WS > application and the jar log to the defined file. > > But if I only specify logging properties for the WS application, only the > application writes logs to the file and jar logs are not written. > > Maybe the problem is that my jar file is in [tomcat]shared/lib directory? (It > is purposely put there, not in WE-INF/lib) Yes, that would have it loaded via a different class loader, so the JAR classes are not in the inheritance hierarchy for the application classes. -- Lew Honi soit qui mal y pense. http://upload.wikimedia.org/wikipedia/commons/c/cf/Friz.jpg