MCPcopy Create free account
hub / github.com/apache/devlake / createPrefix

Method createPrefix

backend/impls/logruslog/logger.go:126–133  ·  view source on GitHub ↗
(newPrefix string)

Source from the content-addressed store, hash-verified

124}
125
126func (l *DefaultLogger) createPrefix(newPrefix string) string {
127 newPrefix = strings.TrimSpace(newPrefix)
128 alreadyInBrackets := alreadyInBracketsRegex.MatchString(newPrefix)
129 if alreadyInBrackets {
130 return fmt.Sprintf("%s %s", l.config.Prefix, newPrefix)
131 }
132 return fmt.Sprintf("%s [%s]", l.config.Prefix, newPrefix)
133}
134
135func formatMessage(err error, msg string, args ...interface{}) string {
136 msg = fmt.Sprintf(msg, args...)

Callers 1

NestedMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected