MCPcopy
hub / github.com/op/go-logging / doFmtVerbLevelColor

Function doFmtVerbLevelColor

log_nix.go:101–109  ·  view source on GitHub ↗
(layout string, level Level, output io.Writer)

Source from the content-addressed store, hash-verified

99}
100
101func doFmtVerbLevelColor(layout string, level Level, output io.Writer) {
102 if layout == "bold" {
103 output.Write([]byte(boldcolors[level]))
104 } else if layout == "reset" {
105 output.Write([]byte("\033[0m"))
106 } else {
107 output.Write([]byte(colors[level]))
108 }
109}

Callers 1

FormatMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected