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

请清除 console.log 信息。 #30

Closed
calidion opened this issue Sep 23, 2015 · 8 comments
Closed

请清除 console.log 信息。 #30

calidion opened this issue Sep 23, 2015 · 8 comments

Comments

@calidion
Copy link

作为基础库,是不能够随便打印信息出来的。
如果遇到错误,请直接抛出异常,如果不是,请不要随便打印信息。
如果你们内部测试用了console.log
请在发布时将console.log删除。
谢谢。

@calidion
Copy link
Author

这么多乱七八糟的信息,严重影响调试。
根本无法定位问题所在。

emit afterRetry
emit error
emit complete
null
[TypeError: Cannot read property 'Location' of null]
5bb0271d743ee080126028856b6bd23bc6153409.jpg
emit complete
null
[TypeError: Cannot read property 'Location' of null]
5bb0271d743ee080126028856b6bd23bc6153409.jpg
emit error
emit complete
null
[TypeError: Cannot read property 'Location' of null]
5bb0271d743ee080126028856b6bd23bc6153409.jpg
emit complete
null
[TypeError: Cannot read property 'Location' of null]
5bb0271d743ee080126028856b6bd23bc6153409.jpg
emit afterRetry
emit error
emit complete
null
[TypeError: Cannot read property 'Location' of null]
5bb0271d743ee080126028856b6bd23bc6153409.jpg
emit complete
null
[TypeError: Cannot read property 'Location' of null]
5bb0271d743ee080126028856b6bd23bc6153409.jpg
emit error
emit complete
null
[TypeError: Cannot read property 'Location' of null]
5bb0271d743ee080126028856b6bd23bc6153409.jpg
emit complete
null
[TypeError: Cannot read property 'Location' of null]
5bb0271d743ee080126028856b6bd23bc6153409.jpg
emit retry
emit afterRetry
emit error
emit complete
null
{ [TypeError: Cannot read property 'Location' of null] statusCode: 404, retryable: false }
5bb0271d743ee080126028856b6bd23bc6153409.jpg
emit complete
null
[TypeError: Cannot read property 'Location' of null]
5bb0271d743ee080126028856b6bd23bc6153409.jpg
emit error
emit complete
null
[TypeError: Cannot read property 'Location' of null]
5bb0271d743ee080126028856b6bd23bc6153409.jpg
emit complete
null
[TypeError: Cannot read property 'Location' of null]
5bb0271d743ee080126028856b6bd23bc6153409.jpg
emit afterRetry
emit error
emit complete
null
[TypeError: Cannot read property 'Location' of null]
5bb0271d743ee080126028856b6bd23bc6153409.jpg
emit complete
null
[TypeError: Cannot read property 'Location' of null]
5bb0271d743ee080126028856b6bd23bc6153409.jpg
emit error
emit complete
null
[TypeError: Cannot read property 'Location' of null]
5bb0271d743ee080126028856b6bd23bc6153409.jpg
emit complete
null
[TypeError: Cannot read property 'Location' of null]
5bb0271d743ee080126028856b6bd23bc6153409.jpg
emit afterRetry
emit error
emit complete
null
[TypeError: Cannot read property 'Location' of null]
5bb0271d743ee080126028856b6bd23bc6153409.jpg
emit complete
null
[TypeError: Cannot read property 'Location' of null]
5bb0271d743ee080126028856b6bd23bc6153409.jpg
emit error
emit complete
null
[TypeError: Cannot read property 'Location' of null]
5bb0271d743ee080126028856b6bd23bc6153409.jpg
emit complete
null
[TypeError: Cannot read property 'Location' of null]
5bb0271d743ee080126028856b6bd23bc6153409.jpg
emit retry
emit afterRetry
emit error
emit complete
null
{ [TypeError: Cannot read property 'Location' of null] statusCode: 404, retryable: false }
5bb0271d743ee080126028856b6bd23bc6153409.jpg
emit complete
null
[TypeError: Cannot read property 'Location' of null]
5bb0271d743ee080126028856b6bd23bc6153409.jpg
emit error
emit complete
null
[TypeError: Cannot read property 'Location' of null]
5bb0271d743ee080126028856b6bd23bc6153409.jpg
emit complete
null
[TypeError: Cannot read property 'Location' of null]
5bb0271d743ee080126028856b6bd23bc6153409.jpg
emit afterRetry
emit error
emit complete
null
[TypeError: Cannot read property 'Location' of null]
5bb0271d743ee080126028856b6bd23bc6153409.jpg
emit complete
null
[TypeError: Cannot read property 'Location' of null]
5bb0271d743ee080126028856b6bd23bc6153409.jpg
emit error
emit complete
null
[TypeError: Cannot read property 'Location' of null]
5bb0271d743ee080126028856b6bd23bc6153409.jpg
emit complete
null
[TypeError: Cannot read property 'Location' of null]
5bb0271d743ee080126028856b6bd23bc6153409.jpg
emit afterRetry
emit error
emit complete
null
[TypeError: Cannot read property 'Location' of null]
5bb0271d743ee080126028856b6bd23bc6153409.jpg
emit complete
null
[TypeError: Cannot read property 'Location' of null]
5bb0271d743ee080126028856b6bd23bc6153409.jpg
emit error
emit complete
null
[TypeError: Cannot read property 'Location' of null]
5bb0271d743ee080126028856b6bd23bc6153409.jpg
emit complete
null
[TypeError: Cannot read property 'Location' of null]
5bb0271d743ee080126028856b6bd23bc6153409.jpg

@calidion
Copy link
Author

并且出错了,还在不断的循环。

@chylvina
Copy link
Contributor

hi, 在环境变量 DEBUG=1 时会输出 log 信息,这的确有点问题,我会在下一个版本改掉。关于出错的地方,你能否提供更详细的信息

@calidion
Copy link
Author

主要是你们在接收数据流的时候打印了信息。
我的env里并且没有DEBUG参数。
你可以通过多添加测试用例来解决软件的bug问题.
调试时可以随便添加debug,或者留下debug的信息对象供别人调用。
但是千万不要直接打印,建议直接抛出异常。

@calidion
Copy link
Author

原打算清除掉console.log,发现你们是放在判断里面的。
打算就作摆了。
同时看你们将这么多内容包装到一个包时,测试用例这么少。
理论上测试用例的代码要比库的代码多一点或者至少,这样的库算是比较成熟的。
我的环境里并没有DEBUG = 'aliyun'的选项的。
为什么也会自动打开呢?

现在我只要一调用测试,就会出来一堆打印信息。
紧急求救!

@calidion
Copy link
Author

看到你们的动作这么迟缓,已经新发布了一个包, 叫aliyun-sdk-clean.
https://github.com/OneNodeToRuleThemAll/aliyun-sdk-js

@calidion
Copy link
Author

请说明一下关闭的理由。如果已经修复,请给出修复的提交版本,即hash值。
谢谢。

@amio
Copy link

amio commented Dec 1, 2015

ping @chylvina

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

No branches or pull requests

3 participants