mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-18 22:41:18 +00:00
CPLogPopup printed [null] as log level; removed.
This commit is contained in:
1 parent
4eb1490d80
commit
554aa77707
1 file changed
+3
-2
+3
-2
@@ -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:
|
||||
|
||||
Reference in new issue
Block a user