Skip to content

Release 5.10.0 changed behavior of admin.database.enableLogging(true) #230

@ryanpbrewster

Description

@ryanpbrewster

[REQUIRED] Step 2: Describe your environment

  • Operating System version: linux
  • Firebase SDK version: v5.10.0
  • Firebase Product: database

[REQUIRED] Step 3: Describe the problem

In release v5.9.1, admin.database.enableLogging(true) enables logging messages for the database websocket connection. In release v5.10.0 this no longer works.

Steps to reproduce:

var admin = require('firebase-admin');
admin.database.enableLogging(true);
admin.initializeApp({ /* ... */ });
admin.database().ref("foo").set(42)

In v5.9.1 I get output like this:

p:0: Browser went online. 
0: set {"path":"/foo","value":42,"priority":null} 
p:0: Buffering put: /foo 
p:0: Making a connection attempt 
p:0: Auth token refreshed 
getToken() completed. Creating connection. 
c:0:0: Connection created 
c:0:0:0 Websocket connecting to wss://<database_name>.firebaseio.com/.ws?v=5 
c:0:0:0 Websocket connected. 
c:0:0: Realtime connection established. 
p:0: connection ready 
p:0: reportStats {"c":{"sdk.admin_node.5-9-1":1}} 
p:0: {"r":1,"a":"s","b":{"c":{"sdk.admin_node.5-9-1":1}}} 
p:0: {"r":2,"a":"gauth","b":{"cred":"..."}} 
p:0: {"r":3,"a":"p","b":{"p":"/foo","d":42}} 
p:0: from server: {"r":1,"b":{"s":"ok","d":""}} 
c:0:0: Primary connection is healthy. 
p:0: from server: {"r":2,"b":{"s":"ok","d":{"auth":null,"expires":1520981134}}} 
p:0: from server: {"r":3,"b":{"s":"ok","d":""}} 
p:0: p response {"s":"ok","d":""} 

In v5.10.0 I get no output.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions