MCPcopy Create free account
hub / github.com/imgproxy/imgproxy / AddHook

Method AddHook

logger/handler.go:76–85  ·  view source on GitHub ↗

AddHook adds a new hook to the handler.

(hook Hook)

Source from the content-addressed store, hash-verified

74
75// AddHook adds a new hook to the handler.
76func (h *Handler) AddHook(hook Hook) {
77 if hook == nil {
78 return
79 }
80
81 h.mu.Lock()
82 defer h.mu.Unlock()
83
84 h.hooks = append(h.hooks, hook)
85}
86
87// Level returns the minimum log level for the handler.
88func (h *Handler) Level() slog.Leveler {

Callers 1

AddHookFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected