Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc for SupportsColor lacks hints to Writers implementing it #127

Closed
dolmen opened this issue Apr 3, 2023 · 2 comments · Fixed by #136
Closed

doc for SupportsColor lacks hints to Writers implementing it #127

dolmen opened this issue Apr 3, 2023 · 2 comments · Fixed by #136

Comments

@dolmen
Copy link
Contributor

dolmen commented Apr 3, 2023

The documentation for interface SupportsColor doesn't give hints to libraries which expose an io.Writer which implement this interface. Is it purely abstract (just a facility with no yet known implementation)?

@evanphx
Copy link
Contributor

evanphx commented Apr 10, 2023

If the writer value passed in Options also has the SupportsColor interface, it will be called to see if color should be enabled: https://github.com/hashicorp/go-hclog/blob/v1.5.0/colorize_unix.go#L27-L33

What sorts of hints are you looking for? I'm not sure exactly what you're asking about.

@dolmen
Copy link
Contributor Author

dolmen commented May 11, 2023

A reference to SupportsColor is missing in the documentation of LoggerOptions.Output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants