changeset 424:397ce12d4222

Added logger factory.
author Raimund Renkert <raimund.renkert@intevation.de>
date Wed, 04 Feb 2015 16:06:36 +0100
parents 3dd907dafe71
children be0cd91abd0f
files src/main/java/de/intevation/lada/util/factory/LoggerFactory.java
diffstat 1 files changed, 25 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /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());
+    }
+}
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)