hashicorp/go-hclog

doc for SupportsColor lacks hints to Writers implementing it

Closed this issue · 2 comments

dolmen commented

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)?

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 commented

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