MCPcopy Create free account
hub / github.com/kataras/iris / Log

Method Log

x/errors/errors.go:341–358  ·  view source on GitHub ↗

Log sends an error of "format" and optional "args" to the client and prints that error using the "LogError" package-level function, which can be customized. See "LogErr" too.

(ctx *context.Context, format string, args ...interface{})

Source from the content-addressed store, hash-verified

339//
340// See "LogErr" too.
341func (e ErrorCodeName) Log(ctx *context.Context, format string, args ...interface{}) {
342 if SkipCanceled {
343 if ctx.IsCanceled() {
344 return
345 }
346
347 for _, arg := range args {
348 if err, ok := arg.(error); ok {
349 if context.IsErrCanceled(err) {
350 return
351 }
352 }
353 }
354 }
355
356 err := fmt.Errorf(format, args...)
357 e.LogErr(ctx, err)
358}
359
360// LogErr sends the given "err" as message to the client and prints that
361// error to using the "LogError" package-level function, which can be customized.

Callers

nothing calls this directly

Calls 4

LogErrMethod · 0.95
IsErrCanceledFunction · 0.92
IsCanceledMethod · 0.80
ErrorfMethod · 0.80

Tested by

no test coverage detected