You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am running the syncv3 binary with both stdout and stderr redirected to a file, and that file appears to contain colour escape sequences meant for a terminal:
synapse0 # cat -vet /var/svc/log/*ssproxy*
[ Oct 8 08:51:27 Disabled. ]$
[ Oct 8 08:51:27 Rereading configuration. ]$
[ Oct 8 08:51:37 Enabled. ]$
[ Oct 8 08:51:37 Executing start method ("/data/ssproxy/start"). ]$
Sync v3 [0.99.10] (d214047)$
Debug=false LogLevel= MaxConns=0$
2023/10/08 08:51:37 goose: no migrations to run. current version: 20230822180807$
^[[90m08:51:37^[[0m ^[[32mINF^[[0m creating handler$
^[[90m08:51:37^[[0m ^[[32mINF^[[0m retrieved global snapshot from database$
^[[90m08:51:37^[[0m ^[[32mINF^[[0m listening on 0.0.0.0:8009$
^[[90m08:51:37^[[0m ^[[32mINF^[[0m StartV2Pollers ^[[36mnum_devices=^[[0m1 ^[[36mnum_fail_decrypt=^[[0m0$
When stdout is not a tty, it would be good if the log output could just be plain text.
The text was updated successfully, but these errors were encountered:
@dougluce An environment variable override doesn't fix this bug. The program needs to check if it's being run interactively, or is redirected to something that isn't a tty; e.g., a file or a pipe. In the case that it's not interactive, it must not emit any terminal control sequences by default.
One would use isatty(3C) for this check, or whatever the Go wrapper around that call is called, on whichever of stdout or stderr is the target of the logging stream.
I am running the
syncv3
binary with both stdout and stderr redirected to a file, and that file appears to contain colour escape sequences meant for a terminal:When stdout is not a tty, it would be good if the log output could just be plain text.
The text was updated successfully, but these errors were encountered: