Diffstat (limited to 'frontend/gamma/js/MochiKit/Logging.js') (more/less context) (ignore whitespace changes)
-rw-r--r-- | frontend/gamma/js/MochiKit/Logging.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/frontend/gamma/js/MochiKit/Logging.js b/frontend/gamma/js/MochiKit/Logging.js index f00996b..8b06e0b 100644 --- a/frontend/gamma/js/MochiKit/Logging.js +++ b/frontend/gamma/js/MochiKit/Logging.js | |||
@@ -1,23 +1,23 @@ | |||
1 | /*** | 1 | /*** |
2 | 2 | ||
3 | MochiKit.Logging 1.5 | 3 | MochiKit.Logging 1.5 |
4 | 4 | ||
5 | See <http://mochikit.com/> for documentation, downloads, license, etc. | 5 | See <http://mochikit.com/> for documentation, downloads, license, etc. |
6 | 6 | ||
7 | (c) 2005 Bob Ippolito. All rights Reserved. | 7 | (c) 2005 Bob Ippolito. All rights Reserved. |
8 | 8 | ||
9 | ***/ | 9 | ***/ |
10 | 10 | ||
11 | MochiKit.Base._module('Logging', '1.5', ['Base']); | 11 | MochiKit.Base.module(MochiKit, 'Logging', '1.5', ['Base']); |
12 | 12 | ||
13 | /** @id MochiKit.Logging.LogMessage */ | 13 | /** @id MochiKit.Logging.LogMessage */ |
14 | MochiKit.Logging.LogMessage = function (num, level, info) { | 14 | MochiKit.Logging.LogMessage = function (num, level, info) { |
15 | this.num = num; | 15 | this.num = num; |
16 | this.level = level; | 16 | this.level = level; |
17 | this.info = info; | 17 | this.info = info; |
18 | this.timestamp = new Date(); | 18 | this.timestamp = new Date(); |
19 | }; | 19 | }; |
20 | 20 | ||
21 | MochiKit.Logging.LogMessage.prototype = { | 21 | MochiKit.Logging.LogMessage.prototype = { |
22 | /** @id MochiKit.Logging.LogMessage.prototype.repr */ | 22 | /** @id MochiKit.Logging.LogMessage.prototype.repr */ |
23 | repr: function () { | 23 | repr: function () { |
@@ -178,25 +178,25 @@ MochiKit.Logging.Logger.prototype = { | |||
178 | firstMsg = Math.max(0, this._messages.length - howMany); | 178 | firstMsg = Math.max(0, this._messages.length - howMany); |
179 | } | 179 | } |
180 | return this._messages.slice(firstMsg); | 180 | return this._messages.slice(firstMsg); |
181 | }, | 181 | }, |
182 | 182 | ||
183 | /** @id MochiKit.Logging.Logger.prototype.getMessageText */ | 183 | /** @id MochiKit.Logging.Logger.prototype.getMessageText */ |
184 | getMessageText: function (howMany) { | 184 | getMessageText: function (howMany) { |
185 | if (typeof(howMany) == 'undefined' || howMany === null) { | 185 | if (typeof(howMany) == 'undefined' || howMany === null) { |
186 | howMany = 30; | 186 | howMany = 30; |
187 | } | 187 | } |
188 | var messages = this.getMessages(howMany); | 188 | var messages = this.getMessages(howMany); |
189 | if (messages.length) { | 189 | if (messages.length) { |
190 | var lst = map(function (m) { | 190 | var lst = MochiKit.Base.map(function (m) { |
191 | return '\n [' + m.num + '] ' + m.level + ': ' + m.info.join(' '); | 191 | return '\n [' + m.num + '] ' + m.level + ': ' + m.info.join(' '); |
192 | }, messages); | 192 | }, messages); |
193 | lst.unshift('LAST ' + messages.length + ' MESSAGES:'); | 193 | lst.unshift('LAST ' + messages.length + ' MESSAGES:'); |
194 | return lst.join(''); | 194 | return lst.join(''); |
195 | } | 195 | } |
196 | return ''; | 196 | return ''; |
197 | }, | 197 | }, |
198 | 198 | ||
199 | /** @id MochiKit.Logging.Logger.prototype.debuggingBookmarklet */ | 199 | /** @id MochiKit.Logging.Logger.prototype.debuggingBookmarklet */ |
200 | debuggingBookmarklet: function (inline) { | 200 | debuggingBookmarklet: function (inline) { |
201 | if (typeof(MochiKit.LoggingPane) == "undefined") { | 201 | if (typeof(MochiKit.LoggingPane) == "undefined") { |
202 | alert(this.getMessageText()); | 202 | alert(this.getMessageText()); |