Codebase list golang-github-go-logr-logr / 1d99a3c
funcr: comments cleanup Tim Hockin 2 years ago
1 changed file(s) with 5 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
252252 buf.WriteByte(',')
253253 } else {
254254 // In theory the format could be something we don't understand. In
255 // practice, we control it, so it won't
255 // practice, we control it, so it won't be.
256256 buf.WriteByte(' ')
257257 }
258258 }
519519 return f.depth
520520 }
521521
522 // FormatInfo flattens an Info log message into strings.
523 // The prefix will be empty when no names were set, or when the output is
522 // FormatInfo renders an Info log message into strings. The prefix will be
523 // empty when no names were set (via AddNames), or when the output is
524524 // configured for JSON.
525525 func (f Formatter) FormatInfo(level int, msg string, kvList []interface{}) (prefix, argsStr string) {
526526 args := make([]interface{}, 0, 64) // using a constant here impacts perf
539539 return prefix, f.render(args, kvList)
540540 }
541541
542 // FormatError flattens an Error log message into strings.
543 // The prefix will be empty when no names were set, or when the output is
542 // FormatError renders an Error log message into strings. The prefix will be
543 // empty when no names were set (via AddNames), or when the output is
544544 // configured for JSON.
545545 func (f Formatter) FormatError(err error, msg string, kvList []interface{}) (prefix, argsStr string) {
546546 args := make([]interface{}, 0, 64) // using a constant here impacts perf