aspose file tools*
The moose likes JBoss/WildFly and the fly likes JBoss' embedded tomcat not Logging Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "JBoss Watch "JBoss New topic
Author

JBoss' embedded tomcat not Logging

Russell Ray
Ranch Hand

Joined: Apr 25, 2005
Posts: 116
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
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17257
    
    6

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


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Russell Ray
Ranch Hand

Joined: Apr 25, 2005
Posts: 116
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
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10222
    
166

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.


[My Blog] [JavaRanch Journal]
Russell Ray
Ranch Hand

Joined: Apr 25, 2005
Posts: 116
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
Marshal

Joined: Jul 20, 2005
Posts: 10222
    
166

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 ]
 
 
subject: JBoss' embedded tomcat not Logging