code: function extractLogLevelAndRest(input) {
    const match = levelPrefixedRegex.exec(input);
    if (!match) return [undefined, input];
    return [match[1], trim(match[2])];
  }
docs: Extracts the log level prefix (if any) and returns it and the rest of the input; otherwise returns undefined and the
  original input.
  @param {string|*} input - the input to split
  @returns {[(LogLevel|undefined), (string|*)]} an array containing the log level (if extracted) or undefined followed
  by the rest of the input trimmed (if level was extracted) or the original input