Skip to content

Commit

Permalink
Do not modify nameencoder
Browse files Browse the repository at this point in the history
  • Loading branch information
shellphy committed Nov 12, 2024
1 parent c1430a7 commit 1305a3f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions encoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ func ColoredLevelEncoder(level zapcore.Level, enc zapcore.PrimitiveArrayEncoder)

// ColoredNameEncoder colorizes service names.
func ColoredNameEncoder(s string, enc zapcore.PrimitiveArrayEncoder) {
if len(s) < 20 {
s += strings.Repeat(" ", 20-len(s))
if len(s) < 12 {
s += strings.Repeat(" ", 12-len(s))
}

enc.AppendString(color.HiGreenString(s))
Expand Down

0 comments on commit 1305a3f

Please sign in to comment.