thin_man 0.19.6 → 0.19.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4f0e4ee879650cc8ce1501b4b0b6cfe7eb2a0122
4
- data.tar.gz: 8557f0bbb4c686bca8ad0b5592ba04a724a819d2
3
+ metadata.gz: 6d0c901eb1d780f09bb66efdf55cd3c961b8d74e
4
+ data.tar.gz: 6297c85daccfe287bf75644c81e3908fbd4663f2
5
5
  SHA512:
6
- metadata.gz: 784e88c488f0970552f3109320801653b6e290310b6882009f0644f04171e9974ff75af5784c340daca59f8fb2b2815aa885b8f73d8f3adf7c87af81919903c1
7
- data.tar.gz: f9313528484b9c26654fa634e4e072dab2c722f4b707dcc20e1987c32ce2fa41525725fe6224208975f01472cc15513ab2ac883dc91c9e8c4b2d3c139c95be25
6
+ metadata.gz: 97e18d8ccf7871a07dff8318ee1e308b0688dbc6bdbb82ccd3ae7a288f554d19a3f702a1281f1af7ed3873c257fee99087de7623e740aa75065f05bceac61d44
7
+ data.tar.gz: 95a4c711990183133a41c1e6c7383c75a9425bf55f1f77eae8d45432ee0042e7f0febd85ae5f920256b46798e81bc13b540e7ba380370e1a431e1a7e105fea8e
@@ -7,12 +7,22 @@ var DebugLogger = Class.extend({
7
7
  if($debug_settings.data('logging_on')){
8
8
  console.log('Debug logging turned on.')
9
9
  this.logging_on = true;
10
+ this.logger_level = $debug_settings.data('logger_level') || 1;
11
+ this.allows = $debug_settings.data('logger_include');
10
12
  } else {
11
13
  this.logging_on = false;
12
14
  }
13
15
  },
14
- log: function(msg){
15
- if(this.logging_on){
16
+ log: function(msg, level, source){
17
+ if(level === undefined){
18
+ level = 0;
19
+ }
20
+ if(source === undefined || this.allows === undefined){
21
+ source_allowed = true;
22
+ }else{
23
+ source_allowed = this.allows[source];
24
+ }
25
+ if(this.logging_on && this.logger_level >= level && source_allowed){
16
26
  console.log(msg)
17
27
  }
18
28
  }