]> git.mxchange.org Git - jcore-logger-ejb.git/blobdiff - src/java/org/mxchange/jcoreeelogger/beans/local/logger/LoggerFactory.java
Changed copyright notice to the FSF, so after my death they will continue my
[jcore-logger-ejb.git] / src / java / org / mxchange / jcoreeelogger / beans / local / logger / LoggerFactory.java
index e5dc9936fae4b1f04e07b36670dfad53b43adf3d..28095ee9bc4746059a77dc16814fcdca57b951bb 100644 (file)
@@ -1,17 +1,17 @@
 /*
- * Copyright (C) 2015 Roland Haeder
+ * Copyright (C) 2016, 2017 Free Software Foundation
  *
  * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ * GNU Affero General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License
+ * You should have received a copy of the GNU Affero General Public License
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 package org.mxchange.jcoreeelogger.beans.local.logger;
@@ -24,8 +24,8 @@ import org.apache.logging.log4j.Logger;
 
 /**
  * A logger factory
- *
- * @author Roland Haeder<roland@mxchange.org>
+ * <p>
+ * @author Roland Hรคder<roland@mxchange.org>
  */
 public class LoggerFactory {
 
@@ -41,10 +41,21 @@ public class LoggerFactory {
                this.logger = LogManager.getLogger(this.getClass().getName());
        }
 
+       /**
+        * Produces a logger instance
+        * <p>
+        * @param injectionPoint Injection point
+        * <p>
+        * @return Logger
+        */
        @Produces
        @Log
-       public Logger getLogger (final InjectionPoint caller) {
-               this.logger.trace(MessageFormat.format("caller={0} - CALLED!", caller));
-               return LogManager.getLogger(caller.getMember().getDeclaringClass().getName());
+       public Logger getLogger (final InjectionPoint injectionPoint) {
+               // Trace message
+               this.logger.trace(MessageFormat.format("injectionPoint={0} - CALLED!", injectionPoint));
+
+               // Return logger for declaring class
+               return LogManager.getLogger(injectionPoint.getMember().getDeclaringClass().getName());
        }
+
 }