Skip to content
This repository was archived by the owner on Nov 17, 2025. It is now read-only.
This repository was archived by the owner on Nov 17, 2025. It is now read-only.

log output appears to include terminal escape sequences even when stdout is not a tty #331

Description

@jclulow

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions