MCPcopy Index your code
hub / github.com/DoNewsCode/core / Sprintf

Function Sprintf

logging/sprintf.go:19–21  ·  view source on GitHub ↗

Sprintf returns a log entry that is formatted using fmt.Sprintf just before writing to the output. This is more desirable than using fmt.Sprintf from the caller's end because the cost of formatting can be avoided if the log is filtered, for example, by log level.

(format string, args ...interface{})

Source from the content-addressed store, hash-verified

17// caller's end because the cost of formatting can be avoided if the log is
18// filtered, for example, by log level.
19func Sprintf(format string, args ...interface{}) fmt.Stringer {
20 return sprintf{format: format, args: args}
21}
22
23type sprint struct {
24 args []interface{}

Callers 7

Example_sprintfFunction · 0.92
WithLoggingFunction · 0.92
executeMethod · 0.92
DebugfMethod · 0.85
InfofMethod · 0.85
WarnfMethod · 0.85
ErrfMethod · 0.85

Calls

no outgoing calls

Tested by 1

Example_sprintfFunction · 0.74