等效于Rails异常的核心转储

编程入门 行业动态 更新时间:2024-10-22 13:28:54
本文介绍了等效于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异常的核心转储

本文发布于:2023-11-17 07:02:43,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1609235.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:异常   核心   Rails

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!