File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Tomcat and the fly likes Removing INFO log entries of Tomcat startup script Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Removing INFO log entries of Tomcat startup script" Watch "Removing INFO log entries of Tomcat startup script" New topic
Author

Removing INFO log entries of Tomcat startup script

Karsten Wutzke
Ranch Hand

Joined: Jul 20, 2010
Posts: 106

Hello,

when Tomcat is started up it outputs INFO-level log entries like
How do I suppress INFO level entries and show only WARNING level entries? Where's the resprective logging property?

Setting
in tomcat/conf/logging.properties didn't work.

Karsten


OCJP JavaSE 6 (86%)
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16058
    
  21

For best results, check the Tomcat docs "logging" section. It describes how to configure the server logs for Tomcat.

I think Tomcat's log config normally comes from its JVM log config, but that's not the best place to override. You should be able to setup a "-Dlogging.properties" in the TOMCAT_HOME/setenv.bat/.sh file (which you have to create yourself).

I'm pulling all this from memory, which is risky business for me, so definitely check the Tomcat docs AND the proper name of the JVM parameter that overrides location of the logging properties file.


Customer surveys are for companies who didn't pay proper attention to begin with.
Karsten Wutzke
Ranch Hand

Joined: Jul 20, 2010
Posts: 106

Well, I tried a few things without success. I then realized that the JBoss Tools plugin I'm using is not picking up the tomcat/conf/logging.properties file, even though I pointed the JBoss Tools server config to the installation path.

Obviously rather a JBoss Tools issue.

Thanks
Karsten
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16058
    
  21

If you're using Tomcat embedded in JBoss, it's really a JBoss logging issue, so that would change things a bit.
Karsten Wutzke
Ranch Hand

Joined: Jul 20, 2010
Posts: 106

If you meant Embedded JBoss, I threw that out of the window recently. I felt it's not needed for my purposes (which I originally considered kind of mandatory for Seam apps, which actually isn't).

So I'm using plain Tomcat right now. My approach was basically right, but... JBoss Tools is based on Eclipse WTP, the latter being able to control Tomcat servers, but you must tell Eclipse WTP's Tomcat launcher to pick up that logging file (even if you have WTP configured to take control of your local Tomcat).

The solution is here:
See http://community.jboss.org/thread/164413

Thanks
Karsten
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16058
    
  21

Actually, JBoss has a copy of Tomcat embedded within it to handle the servlet/JSP aspects of the J2EE stack. Originally, you had the option of using an embedded Tomcat or an embedded Jetty, but I was talking to some JBoss people about a year back and they said the newer stuff is Tomcat-only.

WTP and anything based on it is an entirely different bucket of worms. I'm not a big fan of WTP, because it doesn't run Tomcat cleanly. It cherry-picks stuff out of the Tomcat server config and puts them in its own private internal location. I prefer the sysdeo plugin, since it provides integrated control and debugging for Tomcat while still working with the standard Tomcat configuration. And better yet, with the enhanced configurations that I use for production servers.

So it's possible that JBoss Tools isn't honoring the standard log config if it's using WTP functions.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Removing INFO log entries of Tomcat startup script