Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

代码比较奇怪的几点 #33

Closed
WebGuHui opened this issue Aug 21, 2017 · 5 comments
Closed

代码比较奇怪的几点 #33

WebGuHui opened this issue Aug 21, 2017 · 5 comments
Labels

Comments

@WebGuHui
Copy link

1、
image
不是很明白为什么我自己提交,你要给我一个GET的 url,我还需要自己拆吗?

2、
image

image

image

为什么同一个error,会被processError给解析一遍,然后触发两次onReport?

@loskael loskael added the bug label Aug 21, 2017
@WebGuHui
Copy link
Author

请问什么情况了

@huangjiaxing
Copy link

我也有这个问题,同一个错误会上报两次,是出于什么考虑

@librajt
Copy link

librajt commented Mar 13, 2018

get请求主要为了使用gif图打点的方式方便上报。
被处理两遍,可能是为了上报 stack 之类的信息,所以分开成两条。但判断条件好像不完善。
纯猜测

@loskael
Copy link
Member

loskael commented Mar 23, 2018

@WebGuHui

1、问题 1 已经更新,参考 7f3737f

@WebGuHui @huangjiaxing @librajt
2、报两次的问题参考

level: 4, // 错误级别 1-debug 2-info 4-error
data.level = 2;
var newData = T.extend({}, data);
newData.level = 4;

这两次的日志包含的内容基本一致,区别是 msg 和 level,其中 level = 2 的日志是不入库的,可以从实时日志里面找到,而入库的信息里保留原来的 Error.stack 是必要的,事实上,这部分的处理交给服务器来做也是可以的,另外,这部分是 @caihuiji 加的,@caihuiji 来解释一下?

@keminu
Copy link

keminu commented Mar 29, 2018

上报两次的问题有解决方式吗?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants