Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #3264

Re: Inherit logging properties in ja custom jar library?

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!newsfeed.CARNet.hr!news.metronet.hr!not-for-mail
From John Smith <jsmith@yahoo.com>
Newsgroups comp.lang.java.programmer
Subject Re: Inherit logging properties in ja custom jar library?
Date Tue, 26 Apr 2011 16:06:00 +0200
Organization Metronet
Lines 23
Message-ID <ip6jg8$9tr$1@news.metronet.hr> (permalink)
References <ip686m$2i9$1@news.metronet.hr> <ip6imk$j0g$3@news.albasani.net>
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 1303826760 10171 213.147.110.159 (26 Apr 2011 14:06:00 GMT)
X-Complaints-To abuse@metronet.hr
NNTP-Posting-Date Tue, 26 Apr 2011 14:06:00 +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 <ip6imk$j0g$3@news.albasani.net>
Xref x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:3264

Show key headers only | View raw


On 26.4.2011. 15:52, Lew wrote:
> 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?
>

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)

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Inherit logging properties in ja custom jar library? John Smith <jsmith@yahoo.com> - 2011-04-26 12:53 +0200
  Re: Inherit logging properties in ja custom jar library? Lew <noone@lewscanon.com> - 2011-04-26 09:52 -0400
    Re: Inherit logging properties in ja custom jar library? John Smith <jsmith@yahoo.com> - 2011-04-26 16:06 +0200
      Re: Inherit logging properties in ja custom jar library? Lew <noone@lewscanon.com> - 2011-04-26 11:38 -0400
        Re: Inherit logging properties in ja custom jar library? John Smith <jsmith@yahoo.com> - 2011-04-27 11:23 +0200
        Re: Inherit logging properties in ja custom jar library? John Smith <jsmith@yahoo.com> - 2011-04-27 16:04 +0200

csiph-web