funcr: comments cleanup
Tim Hockin
2 years ago
252 | 252 | buf.WriteByte(',') |
253 | 253 | } else { |
254 | 254 | // 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. | |
256 | 256 | buf.WriteByte(' ') |
257 | 257 | } |
258 | 258 | } |
519 | 519 | return f.depth |
520 | 520 | } |
521 | 521 | |
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 | |
524 | 524 | // configured for JSON. |
525 | 525 | func (f Formatter) FormatInfo(level int, msg string, kvList []interface{}) (prefix, argsStr string) { |
526 | 526 | args := make([]interface{}, 0, 64) // using a constant here impacts perf |
539 | 539 | return prefix, f.render(args, kvList) |
540 | 540 | } |
541 | 541 | |
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 | |
544 | 544 | // configured for JSON. |
545 | 545 | func (f Formatter) FormatError(err error, msg string, kvList []interface{}) (prefix, argsStr string) { |
546 | 546 | args := make([]interface{}, 0, 64) // using a constant here impacts perf |