
com.oneandone.ejbcdiunit.util.LoggerProducer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ejb-cdi-unit Show documentation
Show all versions of ejb-cdi-unit Show documentation
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