You can modify the texmf.cnf variables error_line and max_print_line, adding to the "local" texmf.cnf file, whose location depends on the distribution you're using; for TeX Live it is
/usr/local/texlive/2021/texmf.cnf
and the lines to be added are
max_print_line=1000
error_line=254
half_error_line=238
The first number is actually arbitrary, but 1000 seems to be sufficient. The error_line variable must be less than 255 and the maximum value of half_error_line is less than error_line-15
For experimenting you can also set the variables in the environment; assuming a Bash shell,
export max_print_line=1000
export error_line=254
export half_error_line=238
You can find the location of the various texmf.cnf files, in the order they're looked at, by running
kpsewhich -a texmf.cnf
from the command line. On my system I get
/usr/local/texlive/2021/texmf.cnf
/usr/local/texlive/2021/texmf-dist/web2c/texmf.cnf
The “year part” in the path can and will vary according to the currently installed version of TeX Live.