/** * Replace this instance with a homonymous (same name) logger returned by * LoggerFactory. Note that this method is only called during deserialization. * * @return logger with same name as returned by LoggerFactory * @throws ObjectStreamException */ protected Object readResolve() throws ObjectStreamException { Logger logger = LoggerFactory.getLogger(this.name); return new SLF4JLog(logger); } }
/** * Replace this instance with a homonymous (same name) logger returned by * LoggerFactory. Note that this method is only called during deserialization. * * @return logger with same name as returned by LoggerFactory * @throws ObjectStreamException */ protected Object readResolve() throws ObjectStreamException { Logger logger = LoggerFactory.getLogger(this.name); return new SLF4JLog(logger); } }
/** * <p> * Construct (if necessary) and return a <code>Log</code> instance, using * the factory's current set of configuration attributes. * </p> * * @param name * Logical name of the <code>Log</code> instance to be returned * (the meaning of this name is only known to the underlying logging * implementation that is being wrapped) * * @exception LogConfigurationException * if a suitable <code>Log</code> instance cannot be returned */ public Log getInstance(String name) throws LogConfigurationException { Log instance = loggerMap.get(name); if (instance != null) { return instance; } else { Log newInstance; Logger slf4jLogger = LoggerFactory.getLogger(name); if (slf4jLogger instanceof LocationAwareLogger) { newInstance = new SLF4JLocationAwareLog((LocationAwareLogger) slf4jLogger); } else { newInstance = new SLF4JLog(slf4jLogger); } Log oldInstance = loggerMap.putIfAbsent(name, newInstance); return oldInstance == null ? newInstance : oldInstance; } }
/** * <p> * Construct (if necessary) and return a <code>Log</code> instance, using * the factory's current set of configuration attributes. * </p> * * @param name * Logical name of the <code>Log</code> instance to be returned * (the meaning of this name is only known to the underlying logging * implementation that is being wrapped) * * @exception LogConfigurationException * if a suitable <code>Log</code> instance cannot be returned */ public Log getInstance(String name) throws LogConfigurationException { Log instance = loggerMap.get(name); if (instance != null) { return instance; } else { Log newInstance; Logger slf4jLogger = LoggerFactory.getLogger(name); if (slf4jLogger instanceof LocationAwareLogger) { newInstance = new SLF4JLocationAwareLog((LocationAwareLogger) slf4jLogger); } else { newInstance = new SLF4JLog(slf4jLogger); } Log oldInstance = loggerMap.putIfAbsent(name, newInstance); return oldInstance == null ? newInstance : oldInstance; } }
/** * Replace this instance with a homonymous (same name) logger returned by * LoggerFactory. Note that this method is only called during deserialization. * * @return logger with same name as returned by LoggerFactory * @throws ObjectStreamException */ protected Object readResolve() throws ObjectStreamException { Logger logger = LoggerFactory.getLogger(this.name); return new SLF4JLog(logger); } }
/** * Replace this instance with a homonymous (same name) logger returned by * LoggerFactory. Note that this method is only called during deserialization. * * @return logger with same name as returned by LoggerFactory * @throws ObjectStreamException */ protected Object readResolve() throws ObjectStreamException { Logger logger = LoggerFactory.getLogger(this.name); return new SLF4JLog(logger); } }
/** * Replace this instance with a homonymous (same name) logger returned by * LoggerFactory. Note that this method is only called during deserialization. * * @return logger with same name as returned by LoggerFactory * @throws ObjectStreamException */ protected Object readResolve() throws ObjectStreamException { Logger logger = LoggerFactory.getLogger(this.name); return new SLF4JLog(logger); } }
/** * Replace this instance with a homonymous (same name) logger returned by * LoggerFactory. Note that this method is only called during deserialization. * * @return logger with same name as returned by LoggerFactory * @throws ObjectStreamException */ protected Object readResolve() throws ObjectStreamException { Logger logger = LoggerFactory.getLogger(this.name); return new SLF4JLog(logger); } }
instance = new SLF4JLocationAwareLog((LocationAwareLogger) logger); } else { instance = new SLF4JLog(logger);
instance = new SLF4JLocationAwareLog((LocationAwareLogger) logger); } else { instance = new SLF4JLog(logger);
instance = new SLF4JLocationAwareLog((LocationAwareLogger) logger); } else { instance = new SLF4JLog(logger);
/** * <p> * Construct (if necessary) and return a <code>Log</code> instance, using * the factory's current set of configuration attributes. * </p> * * @param name * Logical name of the <code>Log</code> instance to be returned * (the meaning of this name is only known to the underlying logging * implementation that is being wrapped) * * @exception LogConfigurationException * if a suitable <code>Log</code> instance cannot be returned */ public Log getInstance(String name) throws LogConfigurationException { Log instance = loggerMap.get(name); if (instance != null) { return instance; } else { Log newInstance; Logger slf4jLogger = LoggerFactory.getLogger(name); if (slf4jLogger instanceof LocationAwareLogger) { newInstance = new SLF4JLocationAwareLog((LocationAwareLogger) slf4jLogger); } else { newInstance = new SLF4JLog(slf4jLogger); } Log oldInstance = loggerMap.putIfAbsent(name, newInstance); return oldInstance == null ? newInstance : oldInstance; } }