使用 Warbler 打包的 Rails 应用程序的日志在哪里?

发布于 2024-07-29 00:42:33 字数 226 浏览 4 评论 0原文

我正在使用 Warbler 将 Rails 应用程序打包到 WAR 中。 我已将其部署到 JBoss 服务器,并且似乎可以正常工作。

然而,我在 Rails 上遇到了经典的 500 错误,提示“我们很抱歉,但出了点问题。”。

通常,我会查看logs/Production.log以找出问题所在,但由于该项目已被警告,我无法访问它。 问题是,当 Rails 应用程序出现问题时,日志写在哪里?

I'm using Warbler to pack a Rails application into a WAR. I've deployed it to a JBoss server and it seems to works.

However, I'm getting the classic 500 error on Rails saying "We're sorry, but something went wrong.".

Usually, I'd take a look at logs/production.log to find out what's wrong, but since the project is WARed, I can't access it. The question is, where are the logs written when the Rails app gets warbled?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

寂寞笑我太脆弱 2024-08-05 00:42:33

JRuby-Rack 是 Warbler 捆绑的 servlet 容器适配器,默认设置为使用 javax.servlet.ServletContext#log 方法将 Rails 日志重定向到 servlet 容器。 因此日志出现的具体位置是特定于服务器的。 对于 Tomcat,它们应该位于 catalina.out,对于 GlassFish,它们应该位于 server.log。

如果您仍然没有在日志文件中看到错误消息,则可能是某个地方存在错误导致了错误。 请随时在 http://kenai.com/jira/browse/JRUBY_RACK 打开 JRuby-Rack 的问题报告

JRuby-Rack, the servlet container adapter that Warbler bundles, is set up by default to redirect Rails logs to the servlet container using the javax.servlet.ServletContext#log method. So exactly where the logs appear is server-specific. For Tomcat, they should be in catalina.out, for GlassFish, server.log.

If you still don't see error messages in the log files, there could be a bug somewhere along the way that is swallowing the error. Feel free to open a problem report for JRuby-Rack at http://kenai.com/jira/browse/JRUBY_RACK.

早乙女 2024-08-05 00:42:33

虽然这个问题已经很老了并且已经得到了回答,但我在 Sinatra 应用程序中遇到了类似的问题,该应用程序在 Tomcat 中出现并部署。 catalina.out(或 tomcat 日志文件夹)根本没有吐出日志。 我最终发现日志驻留在已部署应用程序的 WEB-INF 文件夹本身中。
例如,

{TOMCAT_BASE}/webapps/{WEB_APPLICATION_PATH/WEB-INF/log/production.log

这对我来说一直是个谜。

Although this question is pretty old and has been answered already, but I had been facing similar issue with Sinatra application which was warbled and deployed in Tomcat. The catalina.out (or tomcat logs folder) was not spitting out the logs at all. I finally found that the logs reside in the deployed application's WEB-INF folder itself.
For example

{TOMCAT_BASE}/webapps/{WEB_APPLICATION_PATH/WEB-INF/log/production.log

This had been a mystery to me for quite sometime.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文