code: function writeActivity(template, activity) {
    if (!enabled) {
      return;
    }
  
    var handlers = outputHandlers.get();
  
    if (handlers.length === 0) {
      throw new Error('No output handlers defined.');
    }
  
    handlers.forEach(function(handler) {
      handler(template(activity));
    });
  }
docs: Outputs the activity message to all defined handlers.
  @param {Function} template Template to use to format the message.
  @param {Activity} activity Activity object.