Return-Path: Delivered-To: apmail-jakarta-avalon-dev-archive@apache.org Received: (qmail 58527 invoked from network); 7 Feb 2002 03:39:04 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 7 Feb 2002 03:39:04 -0000 Received: (qmail 3116 invoked by uid 97); 7 Feb 2002 03:39:11 -0000 Delivered-To: qmlist-jakarta-archive-avalon-dev@jakarta.apache.org Received: (qmail 3098 invoked by uid 97); 7 Feb 2002 03:39:11 -0000 Mailing-List: contact avalon-dev-help@jakarta.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 avalon-dev@jakarta.apache.org Received: (qmail 3087 invoked from network); 7 Feb 2002 03:39:10 -0000 Message-ID: <3C61F749.8060504@silveregg.co.jp> Date: Thu, 07 Feb 2002 12:40:57 +0900 From: Leif Mortenson Organization: Silver Egg Technology User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; ja-JP; rv:0.9.4) Gecko/20011128 Netscape6/6.2.1 X-Accept-Language: en,ja MIME-Version: 1.0 To: Avalon Developers List Subject: Re: About ExcaliburComponentManager and LogKitManager References: <3C616A37.A3C3964A@club-internet.fr> <3C616C11.6030102@apache.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Berin Loritsch wrote: > jean-pierre lerbscher wrote: > >> Hi, >> It seems that these classes (ExcaliburComponentManager, >> AbstractLoggable,... ) depends on org.apache.log.Logger class and >> org.apache.avalon.excalibur.logger.LogKitManager deprecated interface. >> Could you do something for the next release ? >> Thanks >> JPL > > > > These are freshly deprecated interfaces, let's give other projects that > use Excalibur time to migrate first. You'd be surprised how long this > actually takes. It looks like the LogKitManager was replaced by LoggerManager, but what was ExcaliburComponentManager replaced by? Could you explain how things should be done now? We use code like the following, but it uses the deprecated methods: ---- // Create a context to use. DefaultContext context = new DefaultContext(); // Add any context variables here. context.makeReadOnly(); // Create a ConfigurationBuilder to parse the config files. DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder(); // Load in the configuration files Configuration logKitConfig = loadConfiguration( builder, "../conf/logkit.xml" ); Configuration rolesConfig = loadConfiguration( builder, "../conf/roles.xml" ); Configuration componentsConfig = loadConfiguration( builder, "../conf/components.xml" ); // Setup the LogKitManager DefaultLogKitManager logManager = new DefaultLogKitManager(); Logger lmLogger = Hierarchy.getDefaultHierarchy(). getLoggerFor( logKitConfig.getAttribute( "logger", "INFO" ) ); lmLogger.setPriority( Priority.getPriorityForName( logKitConfig.getAttribute( "log-level", "INFO" ) ) ); logManager.setLogger( lmLogger ); logManager.configure( logKitConfig ); /* // New stuff that replaces DefaultLogKitManager ????. LogKitLoggerManager logManager = new LogKitLoggerManager(Hierarchy.getDefaultHierarchy()); logManager.contextualize(context); logManager.configure(componentsConfig); */ // Setup the RoleManager DefaultRoleManager roleManager = new DefaultRoleManager(); roleManager.setLogger( logManager.getLogger( rolesConfig.getAttribute( "logger", "INFO" ) ) ); roleManager.configure( rolesConfig ); // Set up the ComponentManager ExcaliburComponentManager manager = new ExcaliburComponentManager(); manager.setLogger( logManager.getLogger( componentsConfig.getAttribute( "logger", "INFO" ) ) ); manager.setLogKitManager( logManager ); manager.contextualize( context ); manager.setRoleManager( roleManager ); manager.configure( componentsConfig ); manager.initialize(); // Use manager to lookup components.... --- I put in the code to upgrade to LoggerManager, but where do I go from there? Thanks, Leif > > > > -- To unsubscribe, e-mail: For additional commands, e-mail: