Mercurial Hosting > luan
view src/goodjava/logging/LoggerFactory.java @ 1850:64b7076c635c
better link_to_domain
| author | Franklin Schmidt <fschmidt@gmail.com> | 
|---|---|
| date | Sat, 22 Feb 2025 20:26:31 -0700 | 
| parents | 219f2b937f2b | 
| children | 
line wrap: on
 line source
package goodjava.logging; public final class LoggerFactory { public static final ILoggerFactory implementation; static { String s = System.getProperty("goodjava.logger","goodjava.logger.LoggingFactory"); try { implementation = (ILoggerFactory)Class.forName(s).newInstance(); } catch(ClassNotFoundException e) { throw new RuntimeException(e); } catch(InstantiationException e) { throw new RuntimeException(e); } catch(IllegalAccessException e) { throw new RuntimeException(e); } } public static Logger getLogger(String name) { return implementation.getLogger(name); } public static Logger getLogger(Class cls) { return getLogger(cls.getName()); } }
