All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.oneandone.ejbcdiunit.util.LoggerProducer Maven / Gradle / Ivy

Go to download

A module that can be used together with cdiunit to build en ejb-test-environment.

The newest version!
package com.oneandone.ejbcdiunit.util;

import javax.enterprise.inject.Produces;
import javax.enterprise.inject.spi.InjectionPoint;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @author aschoerk
 */
public class LoggerProducer {
    /**
     * Produces and returns a {@link Logger} for the given {@link InjectionPoint}.
     *
     * @param injectionPoint
     *            the InjectionPoint to produce the Logger for
     * @return the Logger
     */
    @Produces
    public Logger produceLogger(InjectionPoint injectionPoint) {
        return LoggerFactory.getLogger(injectionPoint.getMember().getDeclaringClass().getName());
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy