public static Logger exists(final String name) { final LoggerContext ctx = PrivateManager.getContext(); if (!ctx.hasLogger(name)) { return null; } return Logger.getLogger(name); }
public static Logger exists(String name) { LoggerContext ctx = (LoggerContext) PrivateManager.getContext(); if (!ctx.hasLogger(name)) { return null; } return Logger.getLogger(name); }
public static Logger exists(final String name) { final LoggerContext ctx = (LoggerContext) PrivateManager.getContext(); if (!ctx.hasLogger(name)) { return null; } return Logger.getLogger(name); }
public boolean exists(final String name) { return PrivateManager.getContext().hasLogger(name); }
/** * This method is only used for 1.x compatibility. Returns the parent of this Logger. If it doesn't already exist * return a temporary Logger. * * @return The parent Logger. */ public Logger getParent() { final LoggerConfig lc = privateConfig.loggerConfig.getName().equals(getName()) ? privateConfig.loggerConfig .getParent() : privateConfig.loggerConfig; if (lc == null) { return null; } final String lcName = lc.getName(); final MessageFactory messageFactory = getMessageFactory(); if (context.hasLogger(lcName, messageFactory)) { return context.getLogger(lcName, messageFactory); } return new Logger(context, lcName, messageFactory); }