function prettifyMessage$1 ({ log, messageFormat, messageKey = MESSAGE_KEY$1, colorizer = defaultColorizer, levelLabel = LEVEL_LABEL }) {
  if (messageFormat && typeof messageFormat === 'string') {
    const message = String(messageFormat).replace(/{([^{}]+)}/g, function (match, p1) {
      // return log level as string instead of int
      if (p1 === levelLabel && log[LEVEL_KEY]) {
        return LEVELS[log[LEVEL_KEY]]
      }
      // Parse nested key access, e.g. `{keyA.subKeyB}`.
      return p1.split('.').reduce(function (prev, curr) {
        if (prev && prev[curr]) {
          return prev[curr]
        }
        return ''
      }, log)
    });
    return colorizer.message(message)
  }
  if (messageFormat && typeof messageFormat === 'function') {
    const msg = messageFormat(log, messageKey, levelLabel);
    return colorizer.message(msg)
  }
  if (messageKey in log === false) return undefined
  if (typeof log[messageKey] !== 'string') return undefined
  return colorizer.message(log[messageKey])
}
Prettifies a message string if the given `log` has a message property.

@param {object} input
@param {object} input.log The log object with the message to colorize.
@param {string} [input.messageKey='msg'] The property of the `log` that is the
message to be prettified.
@param {string|function} [input.messageFormat=undefined] A format string or function that defines how the
 logged message should be formatted, e.g. `'{level} - {pid}'`.
@param {function} [input.colorizer] A colorizer function that has a
`.message(str)` method attached to it. This function should return a colorized
string which will be the "prettified" message. Default: a no-op colorizer.

@returns {undefined|string} If the message key is not found, or the message
key is not a string, then `undefined` will be returned. Otherwise, a string
that is the prettified message.