/*
- * 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;
/**
* A logger factory
- *
- * @author Roland Haeder<roland@mxchange.org>
+ * <p>
+ * @author Roland Hรคder<roland@mxchange.org>
*/
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());
}
+
}