Return-Path: Delivered-To: apmail-directory-dev-archive@www.apache.org Received: (qmail 24591 invoked from network); 26 Jun 2005 15:12:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 26 Jun 2005 15:12:03 -0000 Received: (qmail 85475 invoked by uid 500); 26 Jun 2005 15:12:02 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 85295 invoked by uid 500); 26 Jun 2005 15:12:01 -0000 Mailing-List: contact dev-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache Directory Developers List" Delivered-To: mailing list dev@directory.apache.org Received: (qmail 85279 invoked by uid 99); 26 Jun 2005 15:12:01 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [192.87.106.226] (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 26 Jun 2005 08:12:01 -0700 Received: from ajax.apache.org (ajax.apache.org [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id 4D0F113 for ; Sun, 26 Jun 2005 17:11:58 +0200 (CEST) Message-ID: <825775245.1119798718314.JavaMail.jira@ajax.apache.org> Date: Sun, 26 Jun 2005 17:11:58 +0200 (CEST) From: "Emmanuel Lecharny (JIRA)" To: dev@directory.apache.org Subject: [jira] Commented: (DIREVE-171) add log4j config patch In-Reply-To: <1622723532.1119796737467.JavaMail.jira@ajax.apache.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/DIREVE-171?page=comments#action_12314510 ] Emmanuel Lecharny commented on DIREVE-171: ------------------------------------------ Hi, Nick, could you modify your patch a little bit? The Category class is deprecated (http://www.docjar.com/docs/api/org/apache/log4j/Category.html) Logger is the class to use. Is this also possible that you add a test before eacjh log.debug call ? log.debug( "Search attempt using filter '" + filter + "' " + "with scope '" + scope + "' and a return limit of '" + limit + "'" ); is expensive as the string is built even if we are not in debug mode. It's better to write : if (log.isDebugEnabled()) { log.debug(...) } Even better, add a private static final boolean DEBUG = log.isDebugEnabled(); and use it this way : if (DEBUG) { log.debug(...) } As DEBUG will be evaluated only once, the test is faster (no function called). Thanks a lot ! > add log4j config patch > ---------------------- > > Key: DIREVE-171 > URL: http://issues.apache.org/jira/browse/DIREVE-171 > Project: Directory Server > Type: Improvement > Components: server main > Versions: 0.9.1 > Reporter: Nick Faiz > Assignee: Alex Karasulu > Priority: Trivial > Attachments: log4j.properties, logging_patch.txt > > Please find enclosed a patch (diff file) and a log4j.properties file. > You should create a src/etc directory for main and core and place the properties file there. > Cheers, > Nick -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira