如何设置Firestore的日志级别? [英] How to set log level for Firestore?

查看:51
本文介绍了如何设置Firestore的日志级别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何设置Firestore的日志级别?

How to set log level for Firestore?

根据文档此处,我应该使用setLogLevel方法,但在Firestore客户端对象(如FirestoreClient.getFirestore())上看不到方法.

According to documentation here, i should use setLogLevel method but i can't see method at Firestore client objects, like FirestoreClient.getFirestore().

推荐答案

对于那些最终试图更改JS Web SDK日志级别的人:

For those who ended up here trying to change the log level for the JS Web SDK:

firebase.firestore.setLogLevel("debug");    // "debug" | "error" | "silent"

请注意,在Firestore之后缺少(),而不是:

Notice the lack of () after firestore, as opposed to:

firebase.firestore().settings(/*...*/)

这篇关于如何设置Firestore的日志级别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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