/** * Returns a Logger using the fully qualified name of the Class as the Logger name. * * @param clazz The Class whose name should be used as the Logger name. If null it will default to the calling * class. * @return The Logger. * @throws UnsupportedOperationException if {@code clazz} is {@code null} and the calling class cannot be * determined. */ public static Logger getLogger(final Class<?> clazz) { final Class<?> cls = callerClass(clazz); return getContext(cls.getClassLoader(), false).getLogger(toLoggerName(cls)); }
/** * Returns a Logger using the fully qualified name of the Class as the Logger name. * * @param clazz The Class whose name should be used as the Logger name. If null it will default to the calling * class. * @param messageFactory The message factory is used only when creating a logger, subsequent use does not change the * logger but will log a warning if mismatched. * @return The Logger. * @throws UnsupportedOperationException if {@code clazz} is {@code null} and the calling class cannot be * determined. */ public static Logger getLogger(final Class<?> clazz, final MessageFactory messageFactory) { final Class<?> cls = callerClass(clazz); return getContext(cls.getClassLoader(), false).getLogger(toLoggerName(cls), messageFactory); }
/** * Returns a Logger using the fully qualified name of the Class as the Logger name. * * @param clazz The Class whose name should be used as the Logger name. If null it will default to the calling * class. * @return The Logger. * @throws UnsupportedOperationException if {@code clazz} is {@code null} and the calling class cannot be * determined. */ public static Logger getLogger(final Class<?> clazz) { final Class<?> cls = callerClass(clazz); return getContext(cls.getClassLoader(), false).getLogger(cls.getCanonicalName()); }
/** * Returns a Logger using the fully qualified name of the Class as the Logger name. * * @param clazz The Class whose name should be used as the Logger name. If null it will default to the calling * class. * @param messageFactory The message factory is used only when creating a logger, subsequent use does not change the * logger but will log a warning if mismatched. * @return The Logger. * @throws UnsupportedOperationException if {@code clazz} is {@code null} and the calling class cannot be * determined. */ public static Logger getLogger(final Class<?> clazz, final MessageFactory messageFactory) { final Class<?> cls = callerClass(clazz); return getContext(cls.getClassLoader(), false).getLogger(cls.getCanonicalName(), messageFactory); }