Rails/Ruby:可以缩短堆栈跟踪的任何方法吗? [英] Rails/Ruby: Any way to shorten the stack traces?

查看:69
本文介绍了Rails/Ruby:可以缩短堆栈跟踪的任何方法吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想限制在Rails中看到的堆栈跟踪的大小.我对调试Rails堆栈的兴趣不如我自己的应用程序那么大.有任何内置方法可以让Rails动态地执行此操作吗?

I would like to limit the size of the stack traces I am seeing in Rails. I'm not really interested in debugging the Rails stack as much as my own application. Is there any built-in way to have Rails do this dynamically?

推荐答案

是.看一下 ActiveSupport :: BacktraceCleaner 类.很好的解释此处.

Yes. Take a look at the ActiveSupport::BacktraceCleaner class. Nice explanation here.

这篇关于Rails/Ruby:可以缩短堆栈跟踪的任何方法吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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