function genRedactedString(str, maxLen) {
    const { length } = str;
    return length <= maxLen
        ? str
        : str.slice(0, maxLen) + ' ... <REDACTED full-length="' + length + '">';
}
helper function that redacts a string representation of a "debug" arg