CapitalColorLevelEncoder serializes a Level to an all-caps string and adds color. For example, InfoLevel is serialized to "INFO" and colored blue.
(l Level, enc PrimitiveArrayEncoder)
| 67 | // CapitalColorLevelEncoder serializes a Level to an all-caps string and adds color. |
| 68 | // For example, InfoLevel is serialized to "INFO" and colored blue. |
| 69 | func CapitalColorLevelEncoder(l Level, enc PrimitiveArrayEncoder) { |
| 70 | s, ok := _levelToCapitalColorString[l] |
| 71 | if !ok { |
| 72 | s = _unknownLevelColor.Add(l.CapitalString()) |
| 73 | } |
| 74 | enc.AppendString(s) |
| 75 | } |
| 76 | |
| 77 | // UnmarshalText unmarshals text to a LevelEncoder. "capital" is unmarshaled to |
| 78 | // CapitalLevelEncoder, "coloredCapital" is unmarshaled to CapitalColorLevelEncoder, |
nothing calls this directly
no test coverage detected
searching dependent graphs…