mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-05 16:46:26 +00:00
Bug 480528 - Color Weave logs to help find errors, engine problems, etc.
This commit is contained in:
parent
4aef6ff6d2
commit
f4237bde35
@ -362,8 +362,13 @@ BasicFormatter.prototype = {
|
||||
|
||||
format: function BF_format(message) {
|
||||
let date = new Date(message.time);
|
||||
|
||||
// Pad a string to a certain length (20) with a character (space)
|
||||
let pad = function BF__pad(str, len, chr) str +
|
||||
new Array(Math.max((len || 20) - str.length + 1, 0)).join(chr || " ");
|
||||
|
||||
return date.toLocaleFormat(this.dateFormat) + "\t" +
|
||||
message.loggerName + "\t" + message.levelDesc + "\t" +
|
||||
pad(message.loggerName) + " " + message.levelDesc + "\t" +
|
||||
message.message + "\n";
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user