ResolutionTo customize the logging configuration for an instance of tcServer or Tomcat that is launched through STS, complete the following steps:
- Click the Package Explorer tab.
- Expand the Servers node. You should see a list of servers configured for use in STS. Locate and expand the server in this list that you want to configure.When that node expands, you should see a list of configuration files for that particular server.
Note: If you do not see a logging.properties file in this list, create one by clicking on the server node. Then click New > File, and name the file logging.properties.
- Open the file logging.properties and add the following text.
handlers= java.util.logging.ConsoleHandler.level= INFO
java.util.logging.ConsoleHandler.level = ALL
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
org.apache.catalina.startup.Bootstrap.level=ALL
org.apache.catalina.startup.Catalina.level=ALL
org.apache.catalina.startup.ClassLoaderFactory.level=ALL
- Save the file.
- In the Servers tab, double-click the tcServer/Tomcat instance top open a configuration window for this instance.
- In General Information, click Open launch configuration. An Edit Configuration window should open.
- In the Edit Configuration window, click the Arguments tab.
- In the VM arguments text field, add these arguments:
Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
-Djava.util.logging.config.file="full/path/to/logging.properties"
- Click Apply.
- Click OK.
- Start the tcServer or Tomcat instance.
In the console, you should see some the logging output from Tomcat. If you used the configuration listed above for the logging.properties file, you should see additional logging output from the Bootstrap, Catalina, and ClassLoaderFactory classes.