PageRenderTime 7ms CodeModel.GetById 2ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/src/org/mt4j/util/logging/MTLoggerFactory.java

http://mt4j.googlecode.com/
Java | 32 lines | 15 code | 10 blank | 7 comment | 2 complexity | cf65e35171c4469298816a19f49fe43f MD5 | raw file
 1package org.mt4j.util.logging;
 2
 3
 4public class MTLoggerFactory {
 5//	private static MTLoggerFactory instance;
 6	private static ILogger logger;
 7	
 8	private MTLoggerFactory(){}
 9	
10//	public static MTLoggerFactory getInstance(){
11//		if (instance == null){
12//			instance = new MTLoggerFactory();
13//		}
14//		return instance;
15//	}
16	
17	
18	public static ILogger getLogger(String name) {
19		if (logger != null){
20			return logger.createNew(name);
21		}else{
22			throw new NoLoggerProvidedException();
23		}
24	}
25	
26	
27	public static void setLoggerProvider(ILogger logger){
28		MTLoggerFactory.logger = logger;
29	}
30	
31
32}