/** * Returns the logger of the specified name, or {@code null} if the JDK logging framework * should be used. * * @param name the name of the logger. * @return the logger, or {@code null} if the JDK logging framework should be used. */ public Logger getLogger(final String name) { final L target = getImplementation(name); if (target == null) { return null; } synchronized (loggers) { Logger logger = loggers.get(name); if (logger == null || !target.equals(unwrap(logger))) { logger = wrap(name, target); loggers.put(name, logger); } return logger; } }
/** * Returns the logger of the specified name, or {@code null} if the JDK logging framework * should be used. * * @param name the name of the logger. * @return the logger, or {@code null} if the JDK logging framework should be used. */ public Logger getLogger(final String name) { final L target = getImplementation(name); if (target == null) { return null; } synchronized (loggers) { Logger logger = loggers.get(name); if (logger == null || !target.equals(unwrap(logger))) { logger = wrap(name, target); loggers.put(name, logger); } return logger; } }