log(level, msg, ...splat) {
    // eslint-disable-line max-params
    // Optimize for the hotpath of logging JSON literals
    if (arguments.length === 1) {
      // Yo dawg, I heard you like levels ... seriously ...
      // In this context the LHS `level` here is actually the `info` so read
      // this as: info[LEVEL] = info.level;
      level[LEVEL] = level.level;
      this._addDefaultMeta(level);
      this.write(level);
      return this;
    }

    // Slightly less hotpath, but worth optimizing for.
    if (arguments.length === 2) {
      if (msg && typeof msg === 'object') {
        msg[LEVEL] = msg.level = level;
        this._addDefaultMeta(msg);
        this.write(msg);
        return this;
      }

      msg = { [LEVEL]: level, level, message: msg };
      this._addDefaultMeta(msg);
      this.write(msg);
      return this;
    }

    const [meta] = splat;
    if (typeof meta === 'object' && meta !== null) {
      // Extract tokens, if none available default to empty array to
      // ensure consistancy in expected results
      const tokens = msg && msg.match && msg.match(formatRegExp);

      if (!tokens) {
        const info = Object.assign({}, this.defaultMeta, meta, {
          [LEVEL]: level,
          [SPLAT]: splat,
          level,
          message: msg
        });

        if (meta.message) info.message = `${info.message} ${meta.message}`;
        if (meta.stack) info.stack = meta.stack;
        if (meta.cause) info.cause = meta.cause;

        this.write(info);
        return this;
      }
    }

    this.write(Object.assign({}, this.defaultMeta, {
      [LEVEL]: level,
      [SPLAT]: splat,
      level,
      message: msg
    }));

    return this;
  }
Ensure backwards compatibility with a `log` method
@param {mixed} level - Level the log message is written at.
@param {mixed} msg - TODO: add param description.
@param {mixed} meta - TODO: add param description.
@returns {Logger} - TODO: add return description.

@example
   // Supports the existing API:
   logger.log('info', 'Hello world', { custom: true });
   logger.log('info', new Error('Yo, it\'s on fire'));

   // Requires winston.format.splat()
   logger.log('info', '%s %d%%', 'A string', 50, { thisIsMeta: true });

   // And the new API with a single JSON literal:
   logger.log({ level: 'info', message: 'Hello world', custom: true });
   logger.log({ level: 'info', message: new Error('Yo, it\'s on fire') });

   // Also requires winston.format.splat()
   logger.log({
     level: 'info',
     message: '%s %d%%',
     [SPLAT]: ['A string', 50],
     meta: { thisIsMeta: true }
   });