Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 93220 invoked from network); 12 Apr 2004 17:25:59 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 12 Apr 2004 17:25:59 -0000 Received: (qmail 7973 invoked by uid 500); 12 Apr 2004 17:25:25 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 7905 invoked by uid 500); 12 Apr 2004 17:25:24 -0000 Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Users List" Reply-To: "Jakarta Commons Users List" Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 7841 invoked from network); 12 Apr 2004 17:25:24 -0000 Received: from unknown (HELO smtp.easystreet.com) (69.30.22.10) by daedalus.apache.org with SMTP; 12 Apr 2004 17:25:24 -0000 Received: from apache.org (dsl-208-161-106-6.dsl.easystreet.com [208.161.106.6]) by smtp.easystreet.com (Postfix) with ESMTP id 25E486DC064 for ; Mon, 12 Apr 2004 10:25:18 -0700 (PDT) Message-ID: <407AD0F3.7070603@apache.org> Date: Mon, 12 Apr 2004 10:25:07 -0700 From: Craig McClanahan User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040113 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jakarta Commons Users List Subject: Re: [logging] setLevel in Jkd14Logger References: <4079F578.5000102@tpg.com.au> In-Reply-To: <4079F578.5000102@tpg.com.au> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Peter B. West wrote: > SimpleLog has getLevel and setLevel methods, but Jdk14Logger does not. > The underlying Logger supports these methods, but it seems on first > inspection that I can only modify the logging level on an existing > instance by "knowing" that I am running a 1.4 Logger, getting the > native Logger instance, and setting the level on that. > > Is this the case? If so, should the Log interface include getLevel > and setLevel, possibly returning null and false respectively when the > underlying implementation does not support level setting? > The commons-logger package is designed to be an adapter on the actual logging calls to the underlying logging implementation, not the configuration. It is expected that, if you are using JDK 1.4 logging, then you must use the standard configuration mechanisms for setting up loggers and logging levels. Likewise, if you're using Log4J, you would use a log4j.properties file. The only reason that SimpleLog has a setLevel method is that it, itself, *is* a simple :-) logging implementation so that you can use c-l out of the box. But configuring any sophisticated logging environment is out of scope for c-l. Craig --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org