Sprint returns a log entry that is formatted using fmt.Sprint just before writing to the output. This is more desirable than using fmt.Sprint from the caller's end because the cost of formatting can be avoided if the log is filtered, for example, by log level.
(args ...interface{})
| 34 | // caller's end because the cost of formatting can be avoided if the log is |
| 35 | // filtered, for example, by log level. |
| 36 | func Sprint(args ...interface{}) fmt.Stringer { |
| 37 | return sprint{args: args} |
| 38 | } |