Linux Tomcat 查看 catalina.out 日志文件
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4178605/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Tomcat view catalina.out log file
提问by fsloke
In Red Hat,
在红帽中,
cd /var/lib/tomcat
tail -f logs/catalina.out
I can see the log in the console.
我可以在控制台中看到日志。
In Ubuntu,
在 Ubuntu 中,
cd /var/lib/tomcat6
tail -f logs/catalina.out
Nothing show out in the console.
控制台中没有任何显示。
May I know what is the problem? Which configuration that I need to look to?
我可以知道是什么问题吗?我需要查看哪种配置?
回答by HEAT
cd /usr/local/tomcat/logs
tail -f catalina.out
回答by fusion27
Tomcat 7 Ubuntu Server 12.04 LTS:
Tomcat 7 Ubuntu 服务器 12.04 LTS:
tail -f /var/log/tomcat7/catalina.out
回答by Roger C S Wernersson
I found mine at
我在
~/apache-tomcat-7.0.25/logs/catalina.out
回答by Andrey Regentov
locate catalina.out
and find out where is your catalina out. Because it depends.
locate catalina.out
并找出你的卡塔琳娜在哪里。因为这取决于。
If there is several, look at their sizes: that with size 0 are not what you want.
如果有多个,请查看它们的大小:大小为 0 的不是您想要的。
回答by jfhfhf839
Sometimes it is located in different places. It depends on the server.
You can use find
to find it:
有时它位于不同的地方。这取决于服务器。您可以使用find
它来查找它:
find / -name catalina.out
回答by LetItRock
It works for me on Ubuntu...
cd var/lib/tomcat7
sudo nano logs/catalina.out
它在 Ubuntu 上对我
有用... cd var/lib/tomcat7
sudo nano logs/catalina.out
回答by Kory Lovre
Just be aware also that catalina.out can be renamed - it can be set in /bin/catalina.sh with the CATALINA_OUT environment variable.
还要注意 catalina.out 可以重命名 - 它可以在 /bin/catalina.sh 中使用 CATALINA_OUT 环境变量进行设置。
回答by firdaus nanda
Try using this:
尝试使用这个:
sudo tail -f /opt/tomcat/logs/catalina.out
回答by Narendra Kharel
Just logged in to the server and type below command
刚刚登录到服务器并输入以下命令
locate catalina.out
It will show all the locations where catalina
file exist within this server.
它将显示catalina
该服务器中文件存在的所有位置。
回答by Chameera W. Ashan
If you are in the home directory first move to apache tomcat use below command
如果您在主目录中,请先移动到 apache tomcat 使用以下命令
cd apache-tomcat/
then move to logs
然后转到日志
cd logs/
then open the catelina.out use the below command
然后打开 catelina.out 使用以下命令
tail -f catalina.out