Return-Path: Delivered-To: apmail-jakarta-log4j-dev-archive@jakarta.apache.org Received: (qmail 51791 invoked by uid 500); 9 Aug 2001 16:57:04 -0000 Mailing-List: contact log4j-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Reply-To: "LOG4J Developers Mailing List" Delivered-To: mailing list log4j-dev@jakarta.apache.org Received: (qmail 51774 invoked from network); 9 Aug 2001 16:57:04 -0000 Date: Thu, 9 Aug 2001 10:24:55 -0400 (EDT) From: X-X-Sender: To: LOG4J Developers Mailing List Subject: Category.log(Priority, x) In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N Hi, I have a function which is returning a boolean. I would like to log all return values and have the logging not suck down performance. I've noticed in the manual that it says I should do this if (category.isInfoEnabled() ) { category.log(Priority.INFO, ""+bMyReturnValue); } This would avoid the parameter concatenation if Info is not enabled. If log4j had a method like log(Priority, boolean) { if (isEnabled(Priority) ) { log(""+boolean); } } wouldn't that allow me to only have a single line in my code like category.log(INFO, bMyReturnValue) and have equal performance? If so, are there any reasons that such a method does not exist? or am I just be pedantic by only wanting the one line? Thanks, IH --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: log4j-dev-help@jakarta.apache.org