CPLogPopup printed [null] as log level; removed.

This commit is contained in:
Leif Singer authored and Ross Boucher committed 2008-12-22 12:18:02 -05:00
1 parent 4eb1490d80
commit 554aa77707
1 file changed
+3 -2
+3 -2
View File
@@ -38,14 +38,15 @@ var _CPLogRegistrations = {};
var _CPFormatLogMessage = function(aString, aLevel, aTitle)
{
var now = new Date();
aLevel = ( aLevel == null ? '' : ' [' + aLevel + ']' );
if (typeof sprintf == "function")
return sprintf("%4d-%02d-%02d %02d:%02d:%02d.%03d %s [%s]: %s",
return sprintf("%4d-%02d-%02d %02d:%02d:%02d.%03d %s%s: %s",
now.getFullYear(), now.getMonth(), now.getDate(),
now.getHours(), now.getMinutes(), now.getSeconds(), now.getMilliseconds(),
aTitle, aLevel, aString);
else
return now + " " + aTitle + " [" + aLevel + "]: " + aString;
return now + " " + aTitle + aLevel + ": " + aString;
}
// Register Functions: