You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by "Rupp, Hans" <H....@dzbw.de> on 2011/07/01 08:32:33 UTC

AW: [[SPAM]] - Re: Enable Logging of the application - Gefundene Wörter list error im Textkörper

Hello,

thank you for your answer. My problem is not configuring the logging from OpenEJB but the fact that do not see any log-output from the code under test.
I have tried to set Environment openejb.logger.external=true in the Eclipse Runtime Configuration. That didn't work. Adding a embedded.logging.properties file to my project didn't work either.

Greetings,

Hans

-----Ursprüngliche Nachricht-----
Von: Romain Manni-Bucau [mailto:rmannibucau@gmail.com] 
Gesendet: Donnerstag, 30. Juni 2011 16:41
An: users@openejb.apache.org
Betreff: [[SPAM]] - Re: Enable Logging of the application - Gefundene Wörter list error im Textkörper

hallo!

in unit test you can configure logging in properties, in tomcat you can do
it in logging.properties (it work sin embedded mode too but it is less
useful):

http://openejb.apache.org/3.0/configuring-logging-in-tests.html

- Romain

2011/6/30 MarcusDidius <ha...@aol.com>

> Hallo,
>
> I use OpenEJB 3.1.4 for Unit-Testing of EJBs. I usually run the JUnit-Tests
> from Eclipse
> My problem is that cannot see any log statements which my own application
> should produce as soon as OpenEJB "takes over".
> I use log4j.
>
> private static Initialization initialization;
>        private static EBICSConnectionDAO connectionDAO;
>        private static Logger log;
>
>        @BeforeClass
>        public static void init() {
>                DOMConfigurator.configure("log4j.xml");
>                log = Logger.getLogger(InitializationTest.class);
>
>  log.error("***************************************************");
>                try {
>                        EbicsTestContext context =
> EbicsTestContext.getInstance();
>                        initialization = (Initialization)
> context.lookup("InitializationBeanLocal");
>                        connectionDAO = (EBICSConnectionDAO)
> context.lookup("EBICSConnectionDAOBeanLocal");
>                } catch (NamingException e) {
>                        // TODO Auto-generated catch block
>                        e.printStackTrace();
>                }
>
>        }
> EBICSTestContext is a class which initializes OpenEJB.
> I can see the log.error with the asterixes in the console and the log-files
> which is configured in log4j.xml.
> However I cannot see any log output from my own code after that, neither
> from the Junit Test methods nor from the application under test. All
> following log output only comes from OpenEJB and EclipseLink
>
> How can I fix that?
>
> Thanks for any help,
>
> Hans
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/Enable-Logging-of-the-application-tp3635794p3635794.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>


40 Jahre DZBW
Herzlichen Dank unseren Kunden und Partnern. Wir freuen uns auf die gemeinsame Fortsetzung der konstruktiven, vertrauensvollen Zusammenarbeit.
Ihre Datenzentrale Baden-Württemberg
_______________________________________________________________________________

Abonnieren Sie unseren Infobrief und erfahren Sie regelmäßig die neuesten Nachrichten über unsere Lösungen, aktuellen Projekte und Entwicklungen. Melden sie sich an mit diesem Link http://www.datenzentrale.de/Info-Brief
_______________________________________________________________________________

Datenzentrale Baden-Württemberg, Anstalt des öffentlichen Rechts
Krailenshaldenstr. 44, 70469 Stuttgart 
Telefon (0711) 8108-20, Telefax (0711) 8108-21350
E-Mail info@dzbw.de, Internet www.datenzentrale.de
Vorstand: Karl Tramer (Vors.) und Harald Schätzle, Vorsitzender des Verwaltungsrats: Gunter Czisch
USt-Id-Nr. DE147794223 
_______________________________________________________________________________