Skip to content
This repository was archived by the owner on Apr 4, 2023. It is now read-only.

Commit 93534c4

Browse files
committed
[readme] - Update database readme to include enableLogging
1 parent 3d4a9a3 commit 93534c4

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

docs/DATABASE.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -487,6 +487,16 @@ firebaseWebApi.database().ref(path).transaction(function(post) {
487487
```
488488
</details>
489489

490+
### enableLogging
491+
The Firebase Realtime Database allows you turn on/off logs. This can be especially useful when trying to pinpoint any issues you may be having.
492+
By default the log level is set to INFO. Turning on logging will set the log level to DEBUG and off will set it to NONE.
493+
494+
You MUST call `enableLogging()` before initializing firebase otherwise the app will crash.
495+
496+
```js
497+
firebase.enableLogging(true); // OR
498+
firebaseWebApi.database.enableLogging(false);
499+
```
490500
### keepInSync
491501
The Firebase Realtime Database synchronizes and stores a local copy of the data for active listeners (see the methods above). In addition, you can keep specific locations in sync.
492502

0 commit comments

Comments
 (0)