MCPcopy
hub / github.com/pocketbase/pocketbase / SkipSuccessActivityLog

Function SkipSuccessActivityLog

apis/middlewares.go:329–337  ·  view source on GitHub ↗

SkipSuccessActivityLog is a helper middleware that instructs the global activity logger to log only requests that have failed/returned an error.

()

Source from the content-addressed store, hash-verified

327// SkipSuccessActivityLog is a helper middleware that instructs the global
328// activity logger to log only requests that have failed/returned an error.
329func SkipSuccessActivityLog() *hook.Handler[*core.RequestEvent] {
330 return &hook.Handler[*core.RequestEvent]{
331 Id: DefaultSkipSuccessActivityLogMiddlewareId,
332 Func: func(e *core.RequestEvent) error {
333 e.Set(requestEventKeySkipSuccessActivityLog, true)
334 return e.Next()
335 },
336 }
337}
338
339// activityLogger middleware takes care to save the request information
340// into the logs database.

Callers 4

bindLogsApiFunction · 0.85
bindRecordAuthApiFunction · 0.85
bindRealtimeApiFunction · 0.85
bindUIExtensionsFunction · 0.85

Calls 2

SetMethod · 0.65
NextMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…