Built-in CWP terminal, or SSH session? Generally, you should not be hard-coding the TERM value. Linux tries very hard to set it to a sane value depending on things like which terminal you are actually using.
You can always remove the log file:
rm -f /usr/local/cwpsrv/logs/error_log
or truncate it to zero bytes:
truncate -s0 /usr/local/cwpsrv/logs/error_log