Add curried trace(), debug() etc. methods to the team object.
authorMike Taylor <mike@indexdata.com>
Wed, 19 Nov 2014 17:10:35 +0000 (17:10 +0000)
committerMike Taylor <mike@indexdata.com>
Wed, 19 Nov 2014 17:10:35 +0000 (17:10 +0000)
src/mkws-team.js

index b402d68..bdb8af9 100644 (file)
@@ -88,8 +88,15 @@ mkws.makeTeam = function($, teamName) {
     that.queue("log").publish(m_teamName, timestamp, s);
   }
 
     that.queue("log").publish(m_teamName, timestamp, s);
   }
 
+  // ### transitional placeholder function until we have promoted all invocations
   that.log = function (x) { _log(mkws.log, x) };
 
   that.log = function (x) { _log(mkws.log, x) };
 
+  mkws.trace = function(x) { _log(mkws.trace, x) };
+  mkws.debug = function(x) { _log(mkws.debug, x) };
+  mkws.info = function(x) { _log(mkws.info, x) };
+  mkws.warn = function(x) { _log(mkws.warn, x) };
+  mkws.error = function(x) { _log(mkws.error, x) };
+  mkws.fatal = function(x) { _log(mkws.fatal, x) };
 
   that.log("making new widget team");
 
 
   that.log("making new widget team");