Eclipse WTP 服务器中的日志输出

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/4591702/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 15:35:08  来源:igfitidea点击:

Logging output in Eclipse WTP server

eclipsetomcatlogging

提问by shinynewbike

I'm running Eclipse 3.5with Tomcat(integrated from WTP) and I want to see the output logs in txt other than just the console

我正在使用Tomcat(从WTP集成)运行Eclipse 3.5,我想在 txt 中查看输出日志,而不仅仅是控制台

Cant find it in my eclipse/workspacenor in the local Tomcat 6installation directory

在我的eclipse/workspace和本地Tomcat 6安装目录中都找不到它

Any clues how to enable these?

任何线索如何启用这些?

I've also enabled org.apache.catalina.valves.RequestDumperValveand the output scrolls by on console which I want to see in txt

我还启用org.apache.catalina.valves.RequestDumperValve了输出在控制台上滚动,我想在 txt 中看到

回答by Saulo Silva

In the Servers tab:

在服务器选项卡中:

  1. Double-click on the Tomcat Server.
  2. Click on "Open launch configuration".
  3. Click on the "Common" tab.
  4. Check the "File" checkbox and specify a file.
  5. Restart the Tomcat server.
  1. 双击 Tomcat 服务器。
  2. 单击“打开启动配置”。
  3. 单击“通用”选项卡。
  4. 选中“文件”复选框并指定一个文件。
  5. 重启Tomcat服务器。

This is based on codesta's answer: https://stackoverflow.com/a/5045247/112335

这是基于 codesta 的回答:https://stackoverflow.com/a/5045247/112335

回答by javamonkey79

Check you Eclipse installation dir - logs are sometimes hiding in there.

检查您的 Eclipse 安装目录 - 日志有时隐藏在那里。

Hope this helps.

希望这可以帮助。

回答by Krishan Subudhi

ps aux | grep tomcat

Check for the value of -Dwtp.deploy Go to that directory and you will find logs folder, web-apps etc there.

检查 -Dwtp.deploy 的值 转到该目录,您将在那里找到日志文件夹、网络应用程序等。

回答by Christophe Roussy

It probably depends on your logger configuration and other technologies you use. They should be where other answers say they are but for me this was not the case. Finding them was a real PITA, but I found them on the same drive in which the Tomcat (or Eclipse ?) was running under:

这可能取决于您的记录器配置和您使用的其他技术。他们应该在其他答案所说的地方,但对我来说情况并非如此。找到它们是一个真正的 PITA,但我在 Tomcat(或 Eclipse ?)运行的同一驱动器上找到了它们:

THE_SAME_DRIVE_AS_YOUR_TOMCAT\tomcat\logs