From 193840c602219a02c3462783ea5fb15a1798ca3c Mon Sep 17 00:00:00 2001 From: aleth Date: Wed, 28 Sep 2016 00:22:41 +0200 Subject: [PATCH] Bug 1275284 - Make debug log more readable. r=clokep --HG-- extra : rebase_source : e1b64d9e0782ae294f9c68fb8e66a11a5d70d28f --- chat/protocols/twitter/twitter.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/chat/protocols/twitter/twitter.js b/chat/protocols/twitter/twitter.js index 85989d6566..cbdda2419e 100644 --- a/chat/protocols/twitter/twitter.js +++ b/chat/protocols/twitter/twitter.js @@ -231,6 +231,8 @@ var GenericTwitterConversation = { entities = aTweet.entities; } + this._account.LOG("Tweet: " + text); + if (Object.keys(entities).length) { /* entArray is an array of entities ready to be replaced in the tweet, * each entity contains: @@ -819,7 +821,10 @@ Account.prototype = { onDataAvailable: function(aRequest) { this.resetStreamTimeout(); let newText = this._pendingData + aRequest.target.response; - this.DEBUG("Received data: " + newText); + if (newText.trim()) + this.DEBUG("Received data: " + newText); + else + this.DEBUG("Received ping"); let messages = newText.split(/\r\n?/); this._pendingData = messages.pop(); for (let message of messages) {