From 65486da2f2a33111346e80280fcfb607c29800f2 Mon Sep 17 00:00:00 2001 From: Leif Singer Date: Sun, 21 Dec 2008 02:26:44 +0100 Subject: [PATCH] CPLogPopup printed [null] as log level; removed. --- Foundation/CPLog.j | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Foundation/CPLog.j b/Foundation/CPLog.j index d2f814b..9f14984 100644 --- a/Foundation/CPLog.j +++ b/Foundation/CPLog.j @@ -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: -- 1.5.5