1 17 18 package org.apache.avalon.logging.logkit; 19 20 import java.util.Map ; 21 22 import org.apache.avalon.util.i18n.ResourceManager; 23 import org.apache.avalon.util.i18n.Resources; 24 25 import org.apache.log.LogTarget; 26 27 33 class DefaultLogTargetManager implements LogTargetManager 34 { 35 39 private static final Resources REZ = 40 ResourceManager.getPackageResources( 41 DefaultLogTargetManager.class ); 42 43 47 50 private final Map m_targets; 51 52 56 60 public DefaultLogTargetManager( Map targets ) throws Exception 61 { 62 if( null == targets ) 63 { 64 throw new NullPointerException ( "targets" ); 65 } 66 m_targets = targets; 67 } 68 69 73 79 public LogTarget getLogTarget( final String id ) 80 { 81 return (LogTarget) m_targets.get( id ); 82 } 83 } 84 | Popular Tags |