Skip to content

Is there a way to detect a TTY? #69

Open
@sneko

Description

Hi @mattn ,

I'm using your library to use or not coloration for my logger. It helps me having colors locally, and better syntax for third-party tools to look at logs (in a cluster...).

Your library is great with runtime except when using tests (go test ...). Do you have a solution to detect a real terminal is behind the command?

I can implement on my own something to force during tests by setting an environment variable, but curious to know your thoughts on this 😄

Thank you,

EDIT: some reading constabulary/gb#472

Librairies that can help formatting "test metadata":

Activity

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

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions