如何查看有关Firebase JavaScript客户端的更多详细信息? [英] How do I see more details about exactly what the Firebase JavaScript client is doing?

查看:113
本文介绍了如何查看有关Firebase JavaScript客户端的更多详细信息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在开发一个使用Firebase的JavaScript应用程序,它必须处理很多复杂的事情。例如,它必须处理网络中断和间歇性高时延。客户端库正在处理这个,但我想知道更多关于它是如何做到的。

有没有办法启用详细的日志记录?

解决方案

是的!您可以启用调试日志,如下所示:

  Firebase.enableLogging(true); 

您可以将其添加到应用程序的源代码中,也可以将其粘贴到您的Web浏览器的JavaScript控制台。

启用后,Firebase客户端库会将大量日志打印到您的JavaScript控制台。



注意:在生产环境中运行这可能不是一个好主意。它增加了客户端使用的相当大的带宽。

I want more insight into what the Firebase JavaScript client library is doing.

I'm developing a JavaScript app using Firebase that has to deal with a lot of complexity. For example, it has to handle network disruptions and intermittent periods of high latency. The client library is handling this, but I want to know more about how it's doing that.

Is there a way to enable verbose logging?

解决方案

Yes! You can enable debugging logs like this:

Firebase.enableLogging(true);

You can either add that to the source code for your app, or paste it into your web browser's JavaScript console.

Once enabled, the Firebase client library prints a whole bunch of logs to your JavaScript console.

Note: It's probably not a good idea to run this in production. It increases the bandwidth that clients use considerably.

这篇关于如何查看有关Firebase JavaScript客户端的更多详细信息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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