Fórumok

How to get Liferay log messages in Developer Studio V 2.2.2

thumbnail
Chris Becker, módosítva 8 év-val korábban

How to get Liferay log messages in Developer Studio V 2.2.2

Regular Member Bejegyzések: 112 Csatlakozás dátuma: 2010.06.11. Legújabb bejegyzések
Hi all;

In a recent upgrade to Liferay 6.2, our organization had a simultaneous application server upgrade from JBoss EAP 6.0 to EAP 6.2. In order to make our local workstation development environments match our production environment as closely as possible, we are looking to utilize Developer Studio, along with Liferay 6.2 running in the appropriate JBoss environment (EAP 6.2). Our efforts have been largely successful, with one exception - the Liferay log messages are not being sent to the console view in the Developer Studio/Eclipse environment.

Understanding that Developer studio ships only with a Tomcat installation, we updated the Eclipse environment to allow for the creation of a JBoss 6.2 EAP server. Through Eclipse Marketplace, the JBoss AS tools were added, which allowed for the creation of JBoss servers objects in Eclipse.

Taking the most recent Liferay 6.2 /JBoss bundle (which comes with JBoss AS 7.1), we removed the jboss-7.1.1 folder and replaced it with JBoss EAP 6.2, after having downloaded it from Red Hat. Following the instructions on the Liferay site for a custom Liferay jboss installation, Liferay dependencies were added, standalone.xml was updated, etc. When starting the Developer Studio, the standard setup was bypassed and a JBoss EAP 6.1+ server object was created and pointed to the modified Liferay 6.2 bundle.

Everything works (e.g. the server starts, Liferay is deployed, etc.), with the exception of the 'missing' Liferay logs. They do not appear in the Eclipse console, but instead can be found in the ../logs folder of the Liferay 6.2 bundle. The regular JBoss log messages are appearing in the console; just not the Liferay-specific stuff.

Anyone know what might be missing? Or how I could get the log output of this modified 6.2 bundle to appear in the Eclipse console?

Any guidance/suggestions would be greatly appreciated.

Thanks in advance,

--Chris
thumbnail
David H Nebinger, módosítva 8 év-val korábban

RE: How to get Liferay log messages in Developer Studio V 2.2.2

Liferay Legend Bejegyzések: 14918 Csatlakozás dátuma: 2006.09.02. Legújabb bejegyzések
Yeah, Chris, my suggestion would be to not do development on jboss.

jBoss is fine for your test, QA and prod servers, but it offers nothing but pain at the development layer. Liferay development really gets zero from running under jBoss, yet you have to deal with all of the jBoss deployment, configuration and runtime issues.

Since the artifacts of Liferay development are the same whether pushing to Tomcat or jBoss, it's much easier to do your dev against Tomcat and push the artifacts to jBoss when you're ready.

Most often PMs, etc., believe that if you're using jBoss 6.2 (or weblogic or websphere or ...) in production the developers have to do the same, and honestly this is just wrong. Your developers will be much more productive focusing on the development tasks (throw in some jRebel for improved developer throughput) and not on the app container deployment issues. The deployment issues can wait until primary development is complete.

Just my opinion but it has served me well...
thumbnail
Chris Becker, módosítva 8 év-val korábban

RE: How to get Liferay log messages in Developer Studio V 2.2.2

Regular Member Bejegyzések: 112 Csatlakozás dátuma: 2010.06.11. Legújabb bejegyzések
Hi David;

Thanks for the reply.

I appreciate your viewpoint - nevertheless, I have been tasked to complete this environment and am 98% there - the log files are the only piece of the puzzle I am yet unable to solve, so still am looking for help.

While the artifacts of Liferay may be the same regardless of the application server environment, there are indeed differences in those environments - which, having them present even at the development stage, stands to serve us better in the long run. It also avoids the potential 'well, it worked in Tomcat!' response - and so our approach is to as much as possible replicate the PROD environment right down to the developer desktop. It's not so much a question of 'have to' - it's more that we want to.

And we do use JRebel - great product!
thumbnail
David H Nebinger, módosítva 8 év-val korábban

RE: How to get Liferay log messages in Developer Studio V 2.2.2

Liferay Legend Bejegyzések: 14918 Csatlakozás dátuma: 2006.09.02. Legújabb bejegyzések
Yeah, "It worked in tomcat", variation of "It worked for me" excuses. Those are always hard to counter of course especially when you have a team of mixed experience.

Is it a matter of configuring liferay's log4j to write to "stdout" so it streams through the jboss console?
Michael El Khoury, módosítva 4 év-val korábban

RE: How to get Liferay log messages in Developer Studio V 2.2.2

New Member Bejegyzések: 9 Csatlakozás dátuma: 2019.09.18. Legújabb bejegyzések
Hello David,I'm in this exactly situation right now, i need to be able to view liferay logs in the jboss console in eclipse.
My answer for your question "Is it a matter of configuring liferay's log4j to write to "stdout" so it streams through the jboss console?" is "i think yes"

I tried to look inside the portal-log4j.xml which come in portal-impl.jar, but found out that there is already a appender for the console which has the level INFO.
I'm on liferay 6.2 GA1 Enterprise here btw.
I hope you can help me..
Thank you in advance