log(msg, level = 'debug') {
    const log = this.opt.log;
    if (!this.opt.debug) {
      return;
    }
    if (typeof log === 'object' && typeof log[level] === 'function') {
      log[level](`mark.js: ${msg}`);
    }
  }
Logs a message if log is enabled
@param {string} msg - The message to log
@param {string} [level="debug"] - The log level, e.g. <code>warn</code>
<code>error</code>, <code>debug</code>
@access protected