code: function formatter(msg, ctx) {
    while (msg.indexOf('%') !== -1) {
      const start = msg.indexOf('%');
      let end = msg.indexOf(' ', start);
  
      if (end === -1) {
        end = msg.length;
      }
  
      msg = msg.slice(0, start) + ctx[msg.slice(start + 1, end)] + msg.slice(end);
    }
  
    return msg;
  }
docs: Borrowed from https://github.com/mikeal/logref/blob/master/main.js#L6-15