Return-Path: Delivered-To: apmail-avalon-dev-archive@www.apache.org Received: (qmail 41928 invoked from network); 30 Jul 2004 05:20:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 30 Jul 2004 05:20:27 -0000 Received: (qmail 12911 invoked by uid 500); 30 Jul 2004 05:20:27 -0000 Delivered-To: apmail-avalon-dev-archive@avalon.apache.org Received: (qmail 12599 invoked by uid 500); 30 Jul 2004 05:20:24 -0000 Mailing-List: contact dev-help@avalon.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Avalon Developers List" Reply-To: "Avalon Developers List" Delivered-To: mailing list dev@avalon.apache.org Received: (qmail 12569 invoked by uid 99); 30 Jul 2004 05:20:24 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [222.148.7.237] (HELO tanukisoftware.com) (222.148.7.237) by apache.org (qpsmtpd/0.27.1) with ESMTP; Thu, 29 Jul 2004 22:20:21 -0700 Received: from [127.0.0.1] (127.0.0.1) by localhost (127.0.0.1) with [XMail 1.9 (Win32/Ix86) ESMTP Server] id for from ; Fri, 30 Jul 2004 14:19:41 +0900 Message-ID: <4109DA6D.60008@tanukisoftware.com> Date: Fri, 30 Jul 2004 14:19:41 +0900 From: Leif Mortenson User-Agent: Mozilla Thunderbird 0.7.2 (Windows/20040707) X-Accept-Language: en, ja, en-us MIME-Version: 1.0 To: Avalon Developers List , Excalibur Developers List Subject: Question about closing a LogKit PriorityFilteringTarget Content-Type: multipart/mixed; boundary="------------060403080100050508050108" X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N --------------060403080100050508050108 Content-Type: text/plain; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit I have been investigating a problem where LogTargets wrapped in a PriorityFilteringTarget were not being closed correctly on application shutdown. As it turns out, the cause is in the Excalibur Logger PriorityFilterTargetFactory. The logkit PriorityFilteringTarget class has a second constructor which accepts a closeWrappedTarget argument. The PriorityFilterTargetFactory is calling a version of the constructor which defaults to setting that argument to false. There are no javadocs explaining the purpose of this argument in the class, and I am not sure of the timing of its addition. I am trying to decide where and how to fix this problem. I can not think of any reason why you would not want to close down the wrapped log targets in the first place. But given that someone went out of their way to provide this behavior, it seems like closing them by default would be better behavior. If I change the default, then I can do so in the LogKit project and be done with it. If however, there is a good reason not to close the wrapped targets down then I will need to add a configuration property to the Excalibur logger PriorityFilterTargetFactory class as It should use the same defaults. The thing is that if the LogTarget is not wrapped, it will always be closed down. The case where it is Wrapped by a PriorityFilteringTarget is actually the only case where it would not be closed. For now, I am going to modify LogKit so the default is to close the wrapped LogTargets when the PriorityFilteringTarget is closed. If there are any concerns about this change then I can go back and change it. I only make an issue of this because someone appears to have gone out of their way to make it work this way... Digging around in CVS, the class was recently created to replace the deprecated PriorityFilter. The old system worked differently, so from what I can tell, this was not an issue. Ahh. As I went to commit this, I found that my karma has been revoked for the avalon-logkit project. :-( I work on Logkit from time to time so unless there was a reason for it, I would still like to have access. :-) Here is the patch. If someone could commit it I would appreciate it. In addition to the one line change, there are a few tabs to spaces fixes. Cheers, Leif --------------060403080100050508050108 Content-Type: text/plain; name="PriorityFilteringTarget.java.diff" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="PriorityFilteringTarget.java.diff" Y3ZzIGRpZmYgLXUgUHJpb3JpdHlGaWx0ZXJpbmdUYXJnZXQuamF2YSANCkluZGV4OiBQcmlv cml0eUZpbHRlcmluZ1RhcmdldC5qYXZhDQo9PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQpSQ1MgZmlsZTogL2hv bWUvY3ZzL2F2YWxvbi1sb2draXQvc3JjL2phdmEvb3JnL2FwYWNoZS9sb2cvb3V0cHV0L1By aW9yaXR5RmlsdGVyaW5nVGFyZ2V0LmphdmEsdg0KcmV0cmlldmluZyByZXZpc2lvbiAxL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ICYmIG1fdGFyZ2V0cyAhPSBudWxsDQogICAgICAgICAgICAgICYmICFldmVudC5nZXRQcmlv cml0eSgpLmlzTG93ZXIobV9wcmlvcml0eSkgKQ0KICAgICAgICAgew0KQEAgLTkzLDcgKzkz LDcgQEANCiAgICAgICAgICAgICAgICAgbV90YXJnZXRzWyBpIF0ucHJvY2Vzc0V2ZW50KCBl dmVudCApOw0KICAgICAgICAgICAgIH0NCiAgICAgICAgIH0JCQ0KLQl9DQorICAgIH0NCiAg ICAgDQogICAgIC8qIChub24tSmF2YWRvYykNCiAgICAgICogQHNlZSBvcmcuYXBhY2hlLmxv Zy51dGlsLkNsb3NlYWJsZSNjbG9zZSgpDQo= --------------060403080100050508050108 Content-Type: text/plain; charset=us-ascii --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org For additional commands, e-mail: dev-help@avalon.apache.org --------------060403080100050508050108--