/var/log/syslog contains VT-100 escape codes

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Summary

"color" codes are written to the system log

Steps to reproduce

$ sudo gitlab-runner register

What is the current bug behavior?

$ sudo grep -E 'runner.+Configuration'   /var/log/syslog 
Nov 17 15:51:26 localhost gitlab-runner[165064]: Configuration loaded #033[0;m  builds#033[0;m=0

What is the expected correct behavior?

$ sudo grep -E 'runner.+Configuration'   /var/log/syslog 
Nov 17 15:51:26 localhost gitlab-runner[165064]: Configuration loaded                              

I don't know if "builds" is significant, or what it means.

Results of GitLab environment info

Expand for output related to GitLab environment info
$ gitlab-runner -v
Version:      15.5.1
Git revision: 7178588d
Git branch:   15-5-stable
GO version:   go1.18.7
Built:        2022-11-11T09:45:25+0000
OS/Arch:      linux/amd64

Results of GitLab application Check

I don't think the GitLab application check is relevant to this issue.

Describe what you would like to see improved.

Log messages should be crystal clear and reflect the serious intention of the daemon's author to communicate unambiguously with the administrator. The presence of escaped escape codes in the log message does not reflect that intention.

gitlab-runner is a honking big utility doing fiddly lights-out work. Colorized output of any kind is unnecessary and can be a hinderance. Try, for instance, using an xterm with -bg khaki1 and black text. The interactive output of gitlab-runner register is almost unreadable. Ask me how I know.

Happy to provide further details and testing. Many thanks for your kind attention.

Edited by 🤖 GitLab Bot 🤖