code: function Debug(chan) {
  
      if (!(this instanceof Debug)) {
          return new Debug(chan);
      }
  
      var self = this;
      self.enableDebug = false;
      self.enableTrace = false;
      self.enableInfo = true;
      self.enableWarning = false;
      self.enableError = true;
  
      function doit(flag,what,args,func) {
          if (flag) {
              if (args.length == 1) {
                  func('[%s:%s] %s',chan,what,args[0]);
              } else {
                  args[0] = '[' + chan + ':' + what + '] ';
                  func.apply(null,args);
              }
          }
      }            
  
      self.trace = function() {
          doit(self.enableTrace,'trace',arguments,console.log);
      };
  
      self.debug = function() {
          doit(self.enableDebug,'debug',arguments,console.log);
      };
   
      self.info = function() {
          doit(self.enableInfo,'info',arguments,console.log);
      };
  
      self.error = function() {
          doit(self.enableError,'error',arguments,console.log);
      };
  
      self.warning = function() {
          doit(self.enableWarning,'warning',arguments,console.log);
      };
  
  }
docs: Levels