Bug 592043 - Log4Moz errors when passing null parameters to the logger; r=asuth
This commit is contained in:
Родитель
d4011befdd
Коммит
99050cd4e4
|
@ -486,8 +486,10 @@ BasicFormatter.prototype = {
|
|||
|
||||
format: function BF_format(message) {
|
||||
let date = new Date(message.time);
|
||||
// The trick below prevents errors further down because mo is null or
|
||||
// undefined.
|
||||
let messageString = [
|
||||
((typeof(mo) == "object") ? mo.toString() : mo) for each
|
||||
("" + mo) for each
|
||||
([,mo] in Iterator(message.messageObjects))].join(" ");
|
||||
return date.toLocaleFormat(this.dateFormat) + "\t" +
|
||||
message.loggerName + "\t" + message.levelDesc + "\t" +
|
||||
|
|
Загрузка…
Ссылка в новой задаче