Bug 920801 - Port chat/ changes from Instantbird to comm-central - 6 - Bio 1906 - Keep the 50 debug log messages just before a disconnection with an error, even after the account is reconnected, UI part, r=fqueze.
authorFlorian Quèze <florian@instantbird.org>
Sun, 24 Mar 2013 18:33:41 +0100
changeset 17245 17414d672f5de729b5aa412ed74f68b21a9942a0
parent 17244 b52a6febc68de85a02cebc33685c1d5471cd3729
child 17246 d86cdb0344e24f1ac0cb3ae9a14351cd75cc9558
push id1103
push usermbanner@mozilla.com
push dateTue, 18 Mar 2014 07:44:06 +0000
treeherdercomm-beta@50c6279a0af0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfqueze
bugs920801
Bug 920801 - Port chat/ changes from Instantbird to comm-central - 6 - Bio 1906 - Keep the 50 debug log messages just before a disconnection with an error, even after the account is reconnected, UI part, r=fqueze.
mail/components/im/content/imAccounts.js
--- a/mail/components/im/content/imAccounts.js
+++ b/mail/components/im/content/imAccounts.js
@@ -233,16 +233,18 @@ var gAccountManager = {
                          .getService(Ci.nsIScriptableDateFormat);
       let time = new Date(m.timeStamp);
       time = dateServ.FormatDateTime("", dateServ.dateFormatShort,
                                      dateServ.timeFormatSeconds,
                                      time.getFullYear(), time.getMonth() + 1,
                                      time.getDate(), time.getHours(),
                                      time.getMinutes(), time.getSeconds());
       let level = dbgMsg.logLevel;
+      if (!level)
+        return "(" + m.errorMessage + ")";
       if (level == dbgMsg.LEVEL_ERROR)
         level = "ERROR";
       else if (level == dbgMsg.LEVEL_WARNING)
         level = "WARN.";
       else if (level == dbgMsg.LEVEL_LOG)
         level = "LOG  ";
       else
         level = "DEBUG"