org.slf4j.impl
public class: JDK14LoggerFactory [javadoc |
source]
java.lang.Object
org.slf4j.impl.JDK14LoggerFactory
All Implemented Interfaces:
org.slf4j.ILoggerFactory
JDK14LoggerFactory is an implementation of
ILoggerFactory returning
the appropriately named
JDK14LoggerAdapter instance.
Field Summary |
---|
Map | loggerMap | |
Method from org.slf4j.impl.JDK14LoggerFactory Summary: |
---|
getLogger |
Methods from java.lang.Object: |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method from org.slf4j.impl.JDK14LoggerFactory Detail: |
public synchronized Logger getLogger(String name) {
Logger ulogger = null;
// protect against concurrent access of loggerMap
synchronized (this) {
// the root logger is called "" in JUL
if(name.equalsIgnoreCase(Logger.ROOT_LOGGER_NAME)) {
name = "";
}
ulogger = (Logger) loggerMap.get(name);
if (ulogger == null) {
java.util.logging.Logger logger = java.util.logging.Logger
.getLogger(name);
ulogger = new JDK14LoggerAdapter(logger);
loggerMap.put(name, ulogger);
}
}
return ulogger;
}
|