Where can I view tomcat's log file in eclipse?
for some reason my tomcat's installation /log file is always empty.
BTW, does tomcat dump to the log file after a while or is it immediate?
Where can I view tomcat's log file in eclipse?
for some reason my tomcat's installation /log file is always empty.
BTW, does tomcat dump to the log file after a while or is it immediate?
Go to the Servers view in eclipse then right click on the server and click Open. The log files are stored in a folder realative to the path in the 'Server path' field
By default, Tomcat writes messages written to System.out
and System.err
to $CATALINA_HOME/log/catalina.out
. (To help you find where $CATALINA_HOME
, the $CATALINA_HOME/webapps
directory is where your webapp should be installed.)
The System.out
and System.err
streams are not buffered, so any output should appear immediately in catalina.out
.
If you are using a logging framework, then the destination of the logging messages depends on how you have configured logging for your webapp. If you haven't configured logging correctly, it is possible that your log messages are simply being dropped. AFAIK, different versions of Tomcat have different was of configuring logging, so refer to the version of the Tomcat documentation that is applicable.
As an experiment, add some traceprints to System.err to your webapp's initialization code, and check that they appear in "catalina.out".
Go to the Servers view in eclipse then right click on the server and click Open. The log files are stored in a folder realative to the path in the 'Server path' field
Since the path field is uneditable, you can also "Open Launch Configuration", click Arguments tab, copy the VM argument for catalina.base (within quotes). This is the full path of your WTP webapp directory. Copying the value to the clipboard can save you the laborious task of browsing the file system to the path.
Also note you should be seeing the output to the log file in your Console view as you run or debug.