Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

netbeans tomcat clear log files

I've been working on an application and accidentally created an infinite loop. Great lots of output went to the tomcat server log file and each time I start tomcat from NetBeans, the IDE is loading all those logs into the GUI. It makes my computer suffocate without operating memory. Unfortunately, the IDE doesn't provide any "clear logs" button.

I've been trying to locate tomcat log files, but I failed. My tomcat is installed in ~/apache-tomcat-7.0.27 and the latest log file under logs subdir is catalina.2013-01-12.log. And today is 2013-02-16. And I found no tomcat under /var/log ;)

I've tried restarting NetBeans, but it doesn't change anything. Still the IDE is loading those great amounts of logs - so the file has got to be somewhere.

I'd appreciate any hints on where to search for those files.

like image 523
ducin Avatar asked Feb 16 '13 16:02

ducin


3 Answers

Somehow I managed to find the correct directory: ~/.netbeans/7.2.1/apache-tomcat-7.0.27.0_base/logs. It held 1,7 GB :)

Still, I don't know:

  • why there's no /var/log/tomcat (maybe because tomcat was installed within NB and not as a standalone package)
  • why is anything put into ~/.netbeans directory
like image 107
ducin Avatar answered Sep 28 '22 05:09

ducin


For me on Windows 7 the logs are in:

C:\Users\<user>\AppData\Roaming\NetBeans\7.2.1\apache-tomcat-7.0.27.0_base
like image 41
beginner_ Avatar answered Sep 28 '22 06:09

beginner_


The tomcat log files depend on your configuration, to see exactly where they are, in NetBeans, go to the "Tools" menu and click "Servers". Select the Tomcat version you're using and in the tab "Connection" take a look to the field "Catalina Base". That's the file path you need, enter this folder, in my case "C:\Users\Tiago Peres\AppData\Roaming\NetBeans\7.3\apache-tomcat-7.0.34.0_base", enter the folder "logs", and delete everything.

like image 40
Tiago Peres França Avatar answered Sep 28 '22 06:09

Tiago Peres França