MCPcopy
hub / github.com/urfave/cli / tracef

Function tracef

cli.go:34–60  ·  cli.go::tracef
(format string, a ...any)

Source from the content-addressed store, hash-verified

32var isTracingOn = os.Getenv("URFAVE_CLI_TRACING") == "on"
33
34func tracef(format string, a ...any) {
35 if !isTracingOn {
36 return
37 }
38
39 if !strings.HasSuffix(format, "\n") {
40 format = format + "\n"
41 }
42
43 pc, file, line, _ := runtime.Caller(1)
44 cf := runtime.FuncForPC(pc)
45
46 fmt.Fprintf(
47 os.Stderr,
48 strings.Join([]string{
49 "## URFAVE CLI TRACE ",
50 file,
51 ":",
52 fmt.Sprintf("%v", line),
53 " ",
54 fmt.Sprintf("(%s)", cf.Name()),
55 " ",
56 format,
57 }, ""),
58 a...,
59 )
60}

Callers 15

PostParseMethod · 0.85
GenericMethod · 0.85
helpCommandActionFunction · 0.85
DefaultCompleteWithFlagsFunction · 0.85
DefaultShowCommandHelpFunction · 0.85
ShowVersionFunction · 0.85
handleTemplateErrorFunction · 0.85
DefaultPrintHelpCustomFunction · 0.85
shouldRunCompletionFunction · 0.85
runCompletionFunction · 0.85
BoolMethod · 0.85

Calls 1

NameMethod · 0.65

Tested by 1

TestTracingFunction · 0.68