MCPcopy Create free account
hub / github.com/cloudreve/cloudreve / DebugWithContext

Function DebugWithContext

inventory/debug/debug.go:24–27  ·  view source on GitHub ↗

DebugWithContext gets a driver and a logging function, and returns a new debugged-driver that prints all outgoing operations with context.

(d dialect.Driver, logger func(context.Context, ...any))

Source from the content-addressed store, hash-verified

22// DebugWithContext gets a driver and a logging function, and returns
23// a new debugged-driver that prints all outgoing operations with context.
24func DebugWithContext(d dialect.Driver, logger func(context.Context, ...any)) dialect.Driver {
25 drv := &DebugDriver{d, logger}
26 return drv
27}
28
29// Exec logs its params and calls the underlying driver Exec method.
30func (d *DebugDriver) Exec(ctx context.Context, query string, args, v any) error {

Callers 1

NewRawEntClientFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected