# HG changeset patch # User Raimund Renkert # Date 1423062396 -3600 # Node ID 397ce12d42225c380f93905000e031ec345a6bff # Parent 3dd907dafe71b6106b60f8b6a39146888b139c8f Added logger factory. diff -r 3dd907dafe71 -r 397ce12d4222 src/main/java/de/intevation/lada/util/factory/LoggerFactory.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/de/intevation/lada/util/factory/LoggerFactory.java Wed Feb 04 16:06:36 2015 +0100 @@ -0,0 +1,25 @@ +/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz + * Software engineering by Intevation GmbH + * + * This file is Free Software under the GNU GPL (v>=3) + * and comes with ABSOLUTELY NO WARRANTY! Check out + * the documentation coming with IMIS-Labordaten-Application for details. + */ +package de.intevation.lada.util.factory; + +import javax.enterprise.context.ApplicationScoped; +import javax.enterprise.inject.Produces; +import javax.enterprise.inject.spi.InjectionPoint; + +import org.apache.log4j.Logger; + + +@ApplicationScoped +public class LoggerFactory { + + @Produces + Logger createLogger(InjectionPoint injectionPoint) { + return Logger.getLogger( + injectionPoint.getMember().getDeclaringClass().getName()); + } +}