In order to ease the transition from using the debug module for logging to
using this library, we have a function that allows the root logger to expose
an api similar to the debug module.  The first returned function takes a
name to use as the debug name and returns a function which accepts log
messages.  The log messages can use util.format formatting to produce
desired output.

This method does not inspect the debug module's DEBUG environment variable
although that would be a good idea.
function makeCompat(logger) {
  return function(name) {
    return function(...x) {
      assume(x).is.an('array');
      assume(x.length).greaterThan(0);
      let msg = util.format.apply(null, x);
      let level = 'warn';
      let msgObj = {
        dbgname: name,
        dbgcmpt: true,
      };
      if (msg.match(/\[alert-operator\]/)) {
        level = 'fatal';
        msgObj.alert = true;
      }
      logger[level].call(logger, msgObj, msg);
    };
  };
}