1 26 27 package org.objectweb.util.monolog.provider.lib; 28 29 import org.objectweb.util.monolog.api.Logger; 30 import org.objectweb.util.monolog.api.LoggerFactory; 31 import org.objectweb.util.monolog.provider.api.LoggerProvider; 32 33 37 public class LoggerProviderSingleton { 38 39 42 static private LoggerProvider unique = null; 43 44 48 static public LoggerProvider getLoggerProvider() { 49 if (unique == null) { 50 unique = new LoggerProviderImpl(); 51 } 52 return unique; 53 } 54 55 61 static public Logger getLogger(String topic, Class caller) { 62 return getLoggerProvider().getLogger(topic, caller); 63 } 64 65 69 static public LoggerFactory getLoggerFactory() { 70 return unique.getLoggerFactory(); 71 } 72 73 78 static public Logger getLogger(String topic) { 79 return unique.getLogger(topic); 80 } 81 82 static public Logger createLogger(String topic, Class caller, String []description){ 83 return getLoggerProvider().createLogger(topic,caller,description); 84 } 85 86 } 87 | Popular Tags |