Last change
on this file since 256 was
256,
checked in by hendrikvanantwerpen, 13 years ago
|
Reworked project structure based on REST interaction and Dojo library. As
soon as this is stable, the old jQueryUI branch can be removed (it's
kept for reference).
|
File size:
553 bytes
|
Line | |
---|
1 | var logger = { |
---|
2 | TRACE: 0, |
---|
3 | INFO: 1, |
---|
4 | WARN: 2, |
---|
5 | ERROR: 3, |
---|
6 | level: 0, |
---|
7 | logPrefix: "", |
---|
8 | |
---|
9 | trace: function(message){ |
---|
10 | if(this.level <= this.TRACE){ |
---|
11 | this._print(message); |
---|
12 | } |
---|
13 | }, |
---|
14 | |
---|
15 | info: function(message){ |
---|
16 | if(this.level <= this.INFO){ |
---|
17 | this._print(message); |
---|
18 | } |
---|
19 | }, |
---|
20 | |
---|
21 | warn: function(message){ |
---|
22 | if(this.level <= this.WARN){ |
---|
23 | this._print(message); |
---|
24 | } |
---|
25 | }, |
---|
26 | |
---|
27 | error: function(message){ |
---|
28 | if(this.level <= this.ERROR){ |
---|
29 | this._print(message); |
---|
30 | } |
---|
31 | }, |
---|
32 | |
---|
33 | _print: function(message){ |
---|
34 | print((this.logPrefix ? (this.logPrefix + " ") : "") + message); |
---|
35 | } |
---|
36 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.