1 16 17 package org.apache.axis.components.logger; 18 19 import org.apache.commons.discovery.tools.DiscoverSingleton; 20 import org.apache.commons.logging.Log; 21 22 import java.security.AccessController ; 23 import java.security.PrivilegedAction ; 24 25 26 29 public class LogFactory { 30 33 private static final org.apache.commons.logging.LogFactory logFactory = 34 getLogFactory(); 35 36 public static Log getLog(String name) { 37 return org.apache.commons.logging.LogFactory.getLog(name); 38 } 39 40 private static final org.apache.commons.logging.LogFactory getLogFactory() { 41 return (org.apache.commons.logging.LogFactory) 42 AccessController.doPrivileged( 43 new PrivilegedAction () { 44 public Object run() { 45 return DiscoverSingleton.find(org.apache.commons.logging.LogFactory.class, 46 org.apache.commons.logging.LogFactory.FACTORY_PROPERTIES, 47 org.apache.commons.logging.LogFactory.FACTORY_DEFAULT); 48 } 49 }); 50 } 51 } 52 | Popular Tags |