1 55 56 package org.jboss.axis.components.logger; 57 58 import org.apache.commons.discovery.tools.DiscoverSingleton; 59 import org.apache.commons.logging.Log; 60 61 import java.security.AccessController ; 62 import java.security.PrivilegedAction ; 63 64 65 68 public class LogFactory 69 { 70 73 private static final org.apache.commons.logging.LogFactory logFactory = 74 getLogFactory(); 75 76 public static Log getLog(String name) 77 { 78 return logFactory.getLog(name); 79 } 80 81 private static final org.apache.commons.logging.LogFactory getLogFactory() 82 { 83 return (org.apache.commons.logging.LogFactory) 84 AccessController.doPrivileged(new PrivilegedAction () 85 { 86 public Object run() 87 { 88 return DiscoverSingleton.find(org.apache.commons.logging.LogFactory.class, 89 org.apache.commons.logging.LogFactory.FACTORY_PROPERTIES, 90 org.apache.commons.logging.LogFactory.FACTORY_DEFAULT); 91 } 92 }); 93 } 94 } 95 | Popular Tags |