score:84

Accepted answer

go to the "server" view, then double-click the tomcat server you're running. the access log files are stored relative to the path in the "server path" field, which itself is relative to the workspace path.

score:1

if you want logs in a separate file other than the console: double click on the server--> open launch configuration--> arguments --> add -dlog.dir = "path where you want to store this file" and restart the server.

tip: make sure that the server is not running when you are trying to add the argument. you should have log4j or similar logging framework in place.

score:2

@royalsampler said:

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.

score:2

double click and open the server. go to 'arguments'. -dcatalina.base= .. something. go to that something. your logs are there.

score:3

if you're after the catalina.out log and you are using eclispe with tomcat, this works for me:

  • create catelina.out some where in your computer. in my case, i put it in logs directory of my tomcat install directory e.g: /opt/apache-tomcat-7.0.83/logs/catena.out
  • go to your eclipse, in the servers tab, double-click on the tomcat server. you will get a screen called overview.
  • click on "open launch configuration". then click on the "common" tab.
  • at standard input and output section, check "output file", click on file system and then selected the folder where your create your catelina.out.
  • finally, restart the tomcat server.

score:13

looks like the logs are scattered? i found access logs under <projectlocation>\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\logs

score:21

another forum provided this answer:

ahh, figured this out. the following system properties need to be set, so that the "logging.properties" file can be picked up.

assuming that the tomcat is located under an eclipse project, add the following under the "arguments" tab of its launch configuration:

-dcatalina.base="${project_loc}\<apache-tomcat-5.5.23_loc>" 
-dcatalina.home="${project_loc}\<apache-tomcat-5.5.23_loc>" 
-djava.util.logging.config.file="${project_loc}\<apache-tomcat-5.5.23_loc>\conf\logging.properties" 
-djava.util.logging.manager=org.apache.juli.classloaderlogmanager 

http://www.coderanch.com/t/442412/tomcat/tweaking-tomcat-logging-properties-file

score:189

i'm not sure if you were after catalina.out or one of the other logs produced by tomcat.

but, if you're after the catalina.out log file then follow the directions below:

  • in the servers tab, double-click on the tomcat server. you will get a screen called overview.

  • click on "open launch configuration". click on the "common" tab.

  • towards the bottom of the screen you can check the "file" checkbox and then specify a file that can be used to log your console (catalina.out) output.

  • finally, restart the tomcat server.


Related Query

More Query from same tag