/** * <p> * The factory method returns preconfigured Logger wrapper for the class. Method calls * {@link #getSystemLoggerName(java.lang.Class)} to generate default logger name. * </p> * <p> * Since there is no caching implemented, it is advised that the method is called only once * per a class in order to initialize a final static logger variable, which is then used * through the class to perform actual logging tasks. * </p> * * @param componentClass class of the component that will use the logger instance. Must not be {@code null}. * @return logger instance preconfigured for use with the component * @throws NullPointerException if the componentClass parameter is {@code null}. */ public static @NotNull Logger getLogger(final @NotNull Class<?> componentClass) { return new Logger(getSystemLoggerName(componentClass), componentClass.getName()); }
/** * <p> * The factory method returns preconfigured Logger wrapper for the class. Method calls * {@link #getSystemLoggerName(java.lang.Class)} to generate default logger name. * </p> * <p> * Since there is no caching implemented, it is advised that the method is called only once * per a class in order to initialize a final static logger variable, which is then used * through the class to perform actual logging tasks. * </p> * * @param componentClass class of the component that will use the logger instance. Must not be {@code null}. * @return logger instance preconfigured for use with the component * @throws NullPointerException if the componentClass parameter is {@code null}. */ public static @NotNull Logger getLogger(final @NotNull Class<?> componentClass) { return new Logger(getSystemLoggerName(componentClass), componentClass.getName()); }
/** * <p> * The factory method returns preconfigured Logger wrapper for the class. Method calls * {@link #getSystemLoggerName(java.lang.Class)} to generate default logger name. * </p> * <p> * Since there is no caching implemented, it is advised that the method is called only once * per a class in order to initialize a final static logger variable, which is then used * through the class to perform actual logging tasks. * </p> * * @param componentClass class of the component that will use the logger instance. Must not be {@code null}. * @return logger instance preconfigured for use with the component * @throws NullPointerException if the componentClass parameter is {@code null}. */ public static @NotNull Logger getLogger(final @NotNull Class<?> componentClass) { return new Logger(getSystemLoggerName(componentClass), componentClass.getName()); }