view slf4j/src/org/slf4j/impl/GoodFactory.java @ 1586:fcca0ddf5a4d

luan uses goodjava.mail
author Franklin Schmidt <fschmidt@gmail.com>
date Fri, 12 Mar 2021 20:12:43 -0700
parents 1437fb1f0956
children
line wrap: on
line source

package org.slf4j.impl;

import java.util.Map;
import java.util.HashMap;
import org.slf4j.Logger;
import org.slf4j.ILoggerFactory;


public final class GoodFactory implements ILoggerFactory {
	private final Map<String,Logger> map = new HashMap<String,Logger>();

	public synchronized Logger getLogger(String name) {
		Logger logger = map.get(name);
		if( logger == null ) {
			logger = new GoodAdapter(goodjava.logging.LoggerFactory.getLogger(name));
			map.put(name,logger);
		}
		return logger;
	}
}