@grow-codes/aws-cloudwatch-logs - v0.1.1
    Preparing search index...

    Function truncateMessage

    • Truncates message on a UTF-8 character boundary so the result, including the appended …[truncated N bytes] marker, is at most maxBytes UTF-8 bytes. N is the number of bytes removed from the original. Returns message unchanged when it already fits.

      Parameters

      • message: string
      • maxBytes: number

      Returns string