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 09:52:26 -0400 Organization: albasani.net Lines: 15 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 Pa7tKQXJzOGOkSyXff9brN+z8ENMIQSVD88AQCQecXOYtwOCRbqaGJJ1iM/MRmTotllLswPMmu9vxOoTk3d3GQ+LIjf0zXaQ5KYxLSjUm8vUr0Y8DoZ7wbrKsxA35wfy NNTP-Posting-Date: Tue, 26 Apr 2011 13:52:20 +0000 (UTC) Injection-Info: news.albasani.net; logging-data="QbTymwBCoAI5CAeHTmTJqv0FHfHPz/Hwfh2l561KR7HJytnUbpNlt1tP2LGTygFMmptJ6EDM4nRG4Jr8tPyq5AXOFEhLXsifonUF1X1BigyiWW10eAVLDZZg3e2ao1+K"; 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:6nUYiRO7BFOSsmv0NcfWLg6J51Q= Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:3262 On 04/26/2011 06:53 AM, John Smith wrote: > Ja have a custom jar library which is used by a web service application. > Can I inherit the log4j properties from the enveloping application in the jar? > I want them both to write to the same file defined in log4j.properties of the > web service. Unless logging properties are set up specifically for the classes in the JAR, log4j uses the parent logger, which will be the one you set up, AIUI. Have you tried this? Why not? What happened when you did? -- Lew Honi soit qui mal y pense. http://upload.wikimedia.org/wikipedia/commons/c/cf/Friz.jpg