Ah, Thanks for clarifying it. By the way, I was looking to get the normal catalina.log, access.log and other logs that Tomcat usually generates.
I can see now that tomcat is started and then SystemInstance is initialized https://github.com/apache/tomee/blob/tomee-7.0.1/tomee/tomee-embedded/src/main/java/org/apache/tomee/embedded/Container.java#L591 https://github.com/apache/tomee/blob/tomee-7.0.1/tomee/tomee-embedded/src/main/java/org/apache/tomee/embedded/Container.java#L646 regards, sathwik On 2016-11-04 15:19 (+0530), Romain Manni-Bucau <[email protected]> wrote: > (just repeating to ensure it is clear and you dont get me wrong: you didnt > mention explicitly what "doesnt work") > > TomEE-tomcat log setup works when tomee is initialized. Tomcat instance is > started a little bit before tomee/openejb starts (the 4-5 lines you see > using JUL). The test "is it started" is to check SystemInstance is > intialized and Logger is configured. If you init them manually before > starting tomee the first logs should be redirected to the configured > properties of Logger and then tomee will initialized properly but first > logs will have used the intended logger. > > > Romain Manni-Bucau > @rmannibucau <https://twitter.com/rmannibucau> | Blog > <https://blog-rmannibucau.rhcloud.com> | Old Blog > <http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> | > LinkedIn <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory > <https://javaeefactory-rmannibucau.rhcloud.com> > > 2016-11-04 10:35 GMT+01:00 Sathwik <[email protected]>: > > > openejb.log.factory=slf4j > > is already set in system.properties and it is already in the classpath > > > > Do we need to explicitly initialize? > > org.apache.openejb.loader.SystemInstance.init(properties); > > org.apache.openejb.util.Logger.configure(properties); > > > > > > On 2016-11-04 14:32 (+0530), Romain Manni-Bucau <[email protected]> > > wrote: > > > is it about the 4-5 tomcat lines done through JUL? Wonder if it still > > > happens on 7.0.2-SNAPSHOT. > > > > > > Anyway a workaround since you are bound to tomee: > > > > > > org.apache.openejb.loader.SystemInstance.init(properties); > > > org.apache.openejb.util.Logger.configure(properties); > > > > > > ensure to put in properties you setup openejb.log.factory=slf4j > > > > > > > > > > > > Romain Manni-Bucau > > > @rmannibucau <https://twitter.com/rmannibucau> | Blog > > > <https://blog-rmannibucau.rhcloud.com> | Old Blog > > > <http://rmannibucau.wordpress.com> | Github <https://github.com/ > > rmannibucau> | > > > LinkedIn <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory > > > <https://javaeefactory-rmannibucau.rhcloud.com> > > > > > > 2016-11-04 9:16 GMT+01:00 Sathwik <[email protected]>: > > > > > > > Here is the packaged server > > > > https://repository.apache.org/content/groups/snapshots/org/ > > > > apache/ode/ode-tomee-server/1.3.7-SNAPSHOT/ode-tomee-server- > > > > 1.3.7-SNAPSHOT.zip > > > > > > > > server startup script is under bin/start.sh > > > > tomee configuration files is under conf/ > > > > > > > > openejb.log.factory=slf4j > > > > conf/log4j2.xml > > > > > > > > Would it be possible for you to have a check? > > > > > > > > On 2016-11-04 13:31 (+0530), Romain Manni-Bucau <[email protected] > > > > > > > wrote: > > > > > Is the question about log4j2? if so you can set > > > > openejb.log.factory=log4j2, > > > > > if not and you rely on JUL you rely on the *JVM* (not tomcat) > > settings > > > > and > > > > > standard JUL configuration. > > > > > > > > > > > > > > > Romain Manni-Bucau > > > > > @rmannibucau <https://twitter.com/rmannibucau> | Blog > > > > > <https://blog-rmannibucau.rhcloud.com> | Old Blog > > > > > <http://rmannibucau.wordpress.com> | Github <https://github.com/ > > > > rmannibucau> | > > > > > LinkedIn <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory > > > > > <https://javaeefactory-rmannibucau.rhcloud.com> > > > > > > > > > > 2016-11-04 8:47 GMT+01:00 Sathwik <[email protected]>: > > > > > > > > > > > Hi, > > > > > > > > > > > > The application is packaged with SLF4J + Log4j2 and starts Tomee > > 7.0.1 > > > > > > embedded container. Is there a way to enable catalina logs. > > > > > > > > > > > > regards, > > > > > > sathwik > > > > > > > > > > > > > > > > > > > > >
