En cours de développement

master
losyme 9 months ago
parent 66f7cc3bd0
commit ede1f7d72f
  1. 8
      format.go

@ -7,7 +7,7 @@
package logger
import (
"fmt"
"strings"
"forge.chapril.org/losyme/buffer"
)
@ -24,13 +24,17 @@ var BufPool = buffer.NewPool(_bufSize)
func loggerLabel(id, name string) string {
if len(name) > _maxNameLen {
name = name[:_maxNameLen]
} else {
name = strings.Repeat(".", _maxNameLen-len(name)) + name
}
if len(id) > _maxIDLen {
id = id[:_maxIDLen]
} else {
id = strings.Repeat(".", _maxIDLen-len(id)) + id
}
return fmt.Sprintf("%*s:%*s", _maxNameLen, name, _maxIDLen, id)
return name + ":" + id
}
/*

Loading…
Cancel
Save