Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!newsfeed.CARNet.hr!news.metronet.hr!not-for-mail From: John Smith Newsgroups: comp.lang.java.programmer Subject: Re: Inherit logging properties in ja custom jar library? Date: Wed, 27 Apr 2011 11:23:29 +0200 Organization: Metronet Lines: 24 Message-ID: References: NNTP-Posting-Host: 213.147.110.159 Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.metronet.hr 1303896209 19343 213.147.110.159 (27 Apr 2011 09:23:29 GMT) X-Complaints-To: abuse@metronet.hr NNTP-Posting-Date: Wed, 27 Apr 2011 09:23:29 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.16) Gecko/20101125 Thunderbird/3.0.11 In-Reply-To: Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:3297 On 26.4.2011. 17:38, Lew wrote: > 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. > Thank you for your help. I'll try to put the jar into the application library. If not I'll leave the logging of ERROR level to system out.