Skip to content

Commit

Permalink
fix: remove extraneous colon from prefix key
Browse files Browse the repository at this point in the history
  • Loading branch information
aymanbagabas committed Jul 25, 2023
1 parent e0ec0b1 commit fb99176
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func (l *Logger) log(level Level, msg interface{}, keyvals ...interface{}) {
}

if l.prefix != "" {
kvs = append(kvs, PrefixKey, l.prefix+":")
kvs = append(kvs, PrefixKey, l.prefix)
}

if msg != nil {
Expand Down
2 changes: 1 addition & 1 deletion text.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ func (l *Logger) textFormatter(keyvals ...interface{}) {
}
case PrefixKey:
if prefix, ok := keyvals[i+1].(string); ok {
prefix = PrefixStyle.Renderer(l.re).Render(prefix)
prefix = PrefixStyle.Renderer(l.re).Render(prefix + ":")
l.b.WriteString(prefix)
l.b.WriteByte(' ')
}
Expand Down

0 comments on commit fb99176

Please sign in to comment.