Tomcat Log files
When the tomcat server is started in NetBeans 6.1, two log files are opened by default in the output window. One with the title 'Apache Tomcat 6.0.16' which is the server log; and another with the title 'Apache Tomcat 6.0.16 Log' which is the log file for server access.
Logs
By default, tomcat server sets up five loggers.
From <userdir>/apache-tomcat-6.0.16_base/conf/logging.properties, there are, by default, five loggers:
- 1catalina.org.apache.juli.FileHandler.directory =
${catalina.base}/logs
- 2localhost.org.apache.juli.FileHandler.directory =
${catalina.base}/logs
- 3manager.org.apache.juli.FileHandler.directory =
${catalina.base}/logs
- 4admin.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
- 5host-manager.org.apache.juli.FileHandler.directory =
${catalina.base}/logs
| No |
Log |
File Under <userdir>/apache-tomcat-6.0.14_base/logs/ |
Displayed in the ide? |
|---|---|---|---|
| 1 | Server Log |
catalina<date>.log |
Yes. Title: 'Apache Tomcat 6.0.16') |
| 2 | Server Access Log | localhost<date>.log | Yes. Title: 'Apache Tomcat 6.0.16 Log') |
| 3 | Manager app log | manager<date>.log | No. To reduce the clutter, as it will be needed only rarely, if at all. |
| 4 | Admin app log |
admin<date>.log | No. To reduce the clutter, as it will be needed only rarely, if at all. |
| 5 |
Host manager log |
host-manager<date>.log | No. To reduce the clutter, as it will be needed only rarely, if at all. |
The log files can be viewed directly at <userdir>/apache-tomcat-6.0.14_base/logs.
FAQs
Q: I closed the log windows. How do I get them back?
- Go to 'Services' window ('Window | Services' menu)
- Expand 'servers'
- Right-click on the node for 'tomcat' server
- Select 'View server output' (The menuitem 'view server output' is only available when the server is running; if the server is stopped, the menuitem is greyed out).
Q. Sometimes the above method opens only one window.
This is a known bug: 153518
Q: Why is one of the logs ('Apache Tomcat 6.0.16 Log') empty?
In <userdir>/apache-tomcat-6.0.16_base/conf/logging.properties,
you will notice that, except for catalina logs, the logging level for
all the other logs are reset to 'INFO' (while catalina is left at
'FINE' level). This is default tomcat behaviour. This means, unless
there are any errors or informational messages, localhost log will be
empty. You can:
- Stop the tomcat server and close the ide
- Open <userdir>/apache-tomcat-6.0.16_base/conf/logging.properties
- Change org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = INFO to org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = FINE
- Restart the ide and start the tomcat server. The file 'Apache Tomcat 6.0.16 Log' should have some info in it now.
Notes
- Though the the above is specific to NetBeans 6.1, the concepts should apply to other NetBeans versions as well.
- For more on tomcat logging: Tomcat Documentation URL

