From 2af92daaf61e66fe580a88b3fdcace47b6af0ce5 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Wed, 9 Sep 2015 10:17:20 +0200 Subject: [PATCH] =?utf8?q?Log=20and=20LoggerFactory=20must=20still=20resid?= =?utf8?q?e=20in=20same=20package=20...=20Well,=20the=20beans.xml=20did=20?= =?utf8?q?the=20final=20trick.=20Signed-off-by:Roland=20H=C3=A4der=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- lib/jshop-ee-lib.jar | Bin 8671 -> 6975 bytes src/conf/beans.xml | 6 ++++ src/java/log4j2.xml | 29 ++++++++++++++++++ .../{ => beans/local/logger}/Log.java | 6 ++-- .../beans/local/logger/LoggerBean.java | 7 ++++- .../local/logger}/LoggerFactory.java | 9 ++++-- 6 files changed, 51 insertions(+), 6 deletions(-) create mode 100644 src/conf/beans.xml create mode 100644 src/java/log4j2.xml rename src/java/org/mxchange/jcoreeelogger/{ => beans/local/logger}/Log.java (92%) rename src/java/org/mxchange/jcoreeelogger/{ => beans/local/logger}/LoggerFactory.java (89%) diff --git a/lib/jshop-ee-lib.jar b/lib/jshop-ee-lib.jar index e9ef1ea9b67272f3cc54aff9166ccaaa4ea99550..657fb7073717301d8fdc08ac57eb98bd8307e0a2 100644 GIT binary patch delta 551 zcmY+Bzb^zq6vt<0_S{t+G%7S(Xe7wpi%4h` zS7}_rNkl{;p+lil=!r(674sIkn8};Zd+$4w?@Q*zxlS6hlT6hK(Fn=A1tUgtZed`b z%KXvB^CKot=uqN_X{8^rsSF~LstpMqfciiLz7!o>I_*PbXd1Cbha`$D0W(6^t2RY8 zjPeM}N}O(}DT+L=*=0yqANA`UquXaCw5(vCH$M3FTQjGILc{EDYG^mpa%@;I(GK>^ z1maFMB`D7z96pNJ;!}vX4gsG$g=yS!5UbWW;@X-;G>Q2i2=GJ_(+e?&$aV_4&R~gK zP*yZJQM-z^VdveLYaXoZ^fE#)vZT67UL^q8XcVr3LCDm$!BJmKHBnFkXw+a^exwAgh3LhY0B#5bt+plc=U_B3 zp2WZ$400mzpj&YJ>d1G1ahZ|2SS&3ilZ&2sxjCXnkF zB_DtXpqQQsB!ye)nT}@y>wiq(_ji(gX&q@sI8WLT9+5K$?@1SePiRHx6iy=C70xo4 z6t_4I@t?5o){hWYW4QSNb}BWoE!@|O~@Ishi{bjVKySOuF5Rh z*9&FaAz-y9XhM`4cCpHKsqCOGJr++0tnj6GuBRem-rLQ`bN(idE5T8M@uu(^AODG% zf>GVmWbfa6X#S-LfGvf!>3e4#xI-7rIQ`}K`s!qe%b?3((5unY#H91lp@z_yT~19- z=8A=DQ={b)0i_bi443V(LUG(K(Q|<;UG?^fGSt#qC0k<=@C_EGilcVV_@qrhXF0yg zSN>l>&U1-|{XKLrk|!?ut;VD)5!Zbe2;gStB>@2$t-{7$iGUyWnhCI(AcPnfHEzb0 zA#dwo2lVzsi1Ktffzupp9reBWl1yvO{i_mm-MoV-lB7A3&IDL8_unD;;2{a zMwr$H5Z1LJgw|LF;dZPKVKtUR7>`@@SiHT`%_F>xUrg+>BrB-$DDWe7Po$q*Y73s* z?((*X0M>RFMX$N2y?WUDNgEx~?_A1nM8)mf9^Sb(>^Cjpu!N-@tY+DyZW`IaS9D9b zDbb_)Apc+Ed13lEGbOgvc7A{t4;I~YLBGIB**Bl14FZ5I>mZ%-vCQ?f+2H3eVOYY$ z0FQ)&4YZ&~ackFE^i_yQe+CcHH6wu0oM{Omg-4&59X!oUdhyFDOMxxpNV5^$BzowP j=mA`U3mmt~ArLhtQ2+1o1=CPnXiYHLyUgtDGjQ||?|B`D diff --git a/src/conf/beans.xml b/src/conf/beans.xml new file mode 100644 index 0000000..0f4e2aa --- /dev/null +++ b/src/conf/beans.xml @@ -0,0 +1,6 @@ + + + diff --git a/src/java/log4j2.xml b/src/java/log4j2.xml new file mode 100644 index 0000000..1ebbd9f --- /dev/null +++ b/src/java/log4j2.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/src/java/org/mxchange/jcoreeelogger/Log.java b/src/java/org/mxchange/jcoreeelogger/beans/local/logger/Log.java similarity index 92% rename from src/java/org/mxchange/jcoreeelogger/Log.java rename to src/java/org/mxchange/jcoreeelogger/beans/local/logger/Log.java index 4f2a82c..3aba73f 100644 --- a/src/java/org/mxchange/jcoreeelogger/Log.java +++ b/src/java/org/mxchange/jcoreeelogger/beans/local/logger/Log.java @@ -14,7 +14,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.mxchange.jcoreeelogger; +package org.mxchange.jcoreeelogger.beans.local.logger; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; @@ -25,12 +25,12 @@ import javax.inject.Qualifier; /** * Logger annotation. This file has been taken from * http://memorynotfound.com/java-se-unit-testing-cdi-junit-jboss-weld-se/ and has been slightly modified to make - * it compile + * it work. * * @author Roland Haeder */ @Qualifier @Retention(RetentionPolicy.RUNTIME) -@Target({ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER, ElementType.TYPE, }) +@Target({ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER, ElementType.TYPE}) public @interface Log { } diff --git a/src/java/org/mxchange/jcoreeelogger/beans/local/logger/LoggerBean.java b/src/java/org/mxchange/jcoreeelogger/beans/local/logger/LoggerBean.java index b1f0538..a64cd8a 100644 --- a/src/java/org/mxchange/jcoreeelogger/beans/local/logger/LoggerBean.java +++ b/src/java/org/mxchange/jcoreeelogger/beans/local/logger/LoggerBean.java @@ -20,7 +20,6 @@ import javax.ejb.Singleton; import javax.ejb.Startup; import javax.inject.Inject; import org.apache.logging.log4j.Logger; -import org.mxchange.jcoreeelogger.Log; /** * A "centralized" logger bean @@ -38,6 +37,12 @@ public class LoggerBean implements LoggerBeanLocal { @Log private Logger logger; + /** + * Default constructor + */ + public LoggerBean () { + } + @Override public void logDebug (final String message) { // Deligate to logger diff --git a/src/java/org/mxchange/jcoreeelogger/LoggerFactory.java b/src/java/org/mxchange/jcoreeelogger/beans/local/logger/LoggerFactory.java similarity index 89% rename from src/java/org/mxchange/jcoreeelogger/LoggerFactory.java rename to src/java/org/mxchange/jcoreeelogger/beans/local/logger/LoggerFactory.java index b9858b3..0fec8f1 100644 --- a/src/java/org/mxchange/jcoreeelogger/LoggerFactory.java +++ b/src/java/org/mxchange/jcoreeelogger/beans/local/logger/LoggerFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015 KLC + * Copyright (C) 2015 Roland Haeder * * 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 @@ -14,13 +14,18 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.mxchange.jcoreeelogger; +package org.mxchange.jcoreeelogger.beans.local.logger; import javax.enterprise.inject.Produces; import javax.enterprise.inject.spi.InjectionPoint; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +/** + * A logger factory + * + * @author Roland Haeder + */ public class LoggerFactory { /** -- 2.39.5