Win a copy of Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

JBoss' embedded tomcat not Logging

 
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am working with JBoss 4.0.5 and everything is working but for some reason I am not getting the logging events from the Web Server (tomcat). All my logging events from the Application server is coming in correctly.



I have looked all over this site for suggestion. I can log into my application via the web browser and I have uncommented the accesslog portion for tomcat and I and getting the log file. I am led to believe things are good with the server. It makes me suspect how I created the log4j.xml elements.

Any suggestions would be greatly appreciated.


Russ
 
ranger
Posts: 17346
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What about the server.xml file in the Tomcat sar directory, I think you can set up Tomcat's Log Valve to do logging for tomcat, and that it has a different log file. I think I am right, but not positive.

Mark
 
Russell Ray
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Mark:

thanks for you suggestion. I looked up on the JBoss documentation and found this:

You shouldn�t need to modify any of this other than for advanced use. If you�ve used Tomcat before as a stand-alone server you should be aware that things are a bit different when using the embedded service. JBoss is in charge and you shouldn�t need to access the Tomcat directory at all. Web applications are deployed by putting them in the JBoss deploy directory and logging output from Tomcat can be found in the JBoss log directory.



However, you can uncomment some elements and start logging access to the web server, but that's about I saw.

Russ
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am not sure which logs from tomcat you would be interested in, but you could try adding the following to the log4j.xml file that you posted:



I guess if you havent specified a priority value for a particular category, its supposed to log at the lowest level. And i would expect the org.apache logs to be logged in the log files even without the above mentioned configuration. But as you say that you are not seeing any, you could try explicitly setting the priority level for the same.
 
Russell Ray
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
For the good of the group.........

I edited the jboss-server.xml file. This file is located in the <JBOSS_DIR>\server\default\deploy\jbossweb-tomcat55.sar\META-INF

<attribute name="Java2ClassLoadingCompliance">true</attribute>
<attribute name="UseJBossWebLoader">true</attribute>
 
Jaikiran Pai
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I edited the jboss-server.xml file. This file is located in the <JBOSS_DIR>\server\default\deploy\jbossweb-tomcat55.sar\META-INF

<attribute name="Java2ClassLoadingCompliance">true</attribute>
<attribute name="UseJBossWebLoader">true</attribute>



Glad, if that worked for you But i am clueless how changing those 2 values related to classloading would help in creating the log files.
[ February 13, 2007: Message edited by: Jaikiran Pai ]
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic