2021-02-05 01:19:59 +00:00
|
|
|
package flog
|
|
|
|
|
|
|
|
import (
|
|
|
|
"strings"
|
|
|
|
)
|
|
|
|
|
|
|
|
func (receiver internalLogger) Prefix(newprefix ...string) Logger {
|
|
|
|
var buffer strings.Builder
|
|
|
|
|
|
|
|
buffer.WriteString(receiver.prefix)
|
|
|
|
|
|
|
|
for _, s := range newprefix {
|
|
|
|
buffer.WriteString(s)
|
|
|
|
buffer.WriteString(": ")
|
|
|
|
}
|
|
|
|
|
|
|
|
prefix := buffer.String()
|
|
|
|
|
|
|
|
var logger internalLogger = receiver
|
|
|
|
logger.prefix += prefix
|
|
|
|
|
2021-02-05 02:25:22 +00:00
|
|
|
return &logger
|
2021-02-05 01:19:59 +00:00
|
|
|
}
|