
net.jmatrix.db.common.console.slf4j.ConsoleLoggerFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jsql Show documentation
Show all versions of jsql Show documentation
SQL Utilities including simple command line, schema management.
package net.jmatrix.db.common.console.slf4j;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import net.jmatrix.db.common.console.SysConsole;
import net.jmatrix.db.common.console.TextConsole;
import org.slf4j.ILoggerFactory;
import org.slf4j.Logger;
public class ConsoleLoggerFactory implements ILoggerFactory {
TextConsole console=SysConsole.getConsole();
static Map map=new HashMap();
@Override
public Logger getLogger(String name) {
SLF4JConsoleLoggerAdapter log=map.get(name);
if (log == null) {
synchronized(ConsoleLoggerFactory.class) {
log=map.get(name);
if (log == null) {
log=new SLF4JConsoleLoggerAdapter(name, console);
map.put(name, log);
}
}
}
return log;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy