function prettifyMetadata$1 ({ log }) {
  let line = '';

  if (log.name || log.pid || log.hostname) {
    line += '(';

    if (log.name) {
      line += log.name;
    }

    if (log.name && log.pid) {
      line += '/' + log.pid;
    } else if (log.pid) {
      line += log.pid;
    }

    if (log.hostname) {
      // If `pid` and `name` were in the ignore keys list then we don't need
      // the leading space.
      line += `${line === '(' ? 'on' : ' on'} ${log.hostname}`;
    }

    line += ')';
  }

  if (log.caller) {
    line += `${line === '' ? '' : ' '}<${log.caller}>`;
  }

  if (line === '') {
    return undefined
  } else {
    return line
  }
}
Prettifies metadata that is usually present in a Pino log line. It looks for
fields `name`, `pid`, `hostname`, and `caller` and returns a formatted string using
the fields it finds.

@param {object} input
@param {object} input.log The log that may or may not contain metadata to
be prettified.

@returns {undefined|string} If no metadata is found then `undefined` is
returned. Otherwise, a string of prettified metadata is returned.