等效于Rails异常的核心转储 [英] Core dump equivalent for the Rails exception

查看:61
本文介绍了等效于Rails异常的核心转储的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我从应用程序中获得了异常日志。我在该日志中有一个调用堆栈,请求参数和所有其他常用的东西。这是一个罕见的例外,日志中的信息并不包含解决/重复该问题所需的所有详细信息。

So I got an exception log from my application. I have a call stack, request parameters and all other usual stuff in that log. This is a rare exception and info from the log doesn't contain all details I need to resolve / duplicate the problem.

我想知道是否有某种方法(gem?)在发生异常的情况下获得Rails应用程序状态的完全转储。包括来自控制器方法的所有实例和局部变量值。我猜想整个Ruby对象空间的转储可能要花一分钟左右的时间,但是在这种情况下我不在乎磁盘和cpu资源。

I wonder if there is some way (gem?) to get full dump of Rails application state in case of an exception. Including all instance and local variables values from a controller methods. I guess that dump of whole Ruby object space might take even a minute or so but I don't care about disk and cpu resources in a such case.

推荐答案

我不这么认为,我尝试执行类似操作的方法是对我需要更多信息的变量使用logger.error。

I don't think so, the way I go about trying to do something like that is by using logger.error on the variables that i need more on info on.

这篇关于等效于Rails异常的核心转储的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆