MCPcopy
hub / github.com/keploy/keploy / SetDebugFileSink

Function SetDebugFileSink

utils/log/logger.go:619–621  ·  view source on GitHub ↗

SetDebugFileSink registers s as the package-wide active debug file sink. Subsequent calls to DebugFileSink() return s. Pass nil to clear. Used by main entrypoints to publish the sink so cross-package helpers (e.g. RotateDebugFileForTestSet) can reach it without an explicit dependency injection chain

(s *DebugFileSink)

Source from the content-addressed store, hash-verified

617// helpers (e.g. RotateDebugFileForTestSet) can reach it without an
618// explicit dependency injection chain.
619func SetDebugFileSink(s *DebugFileSink) {
620 globalSink.Store(globalSinkHolder{s: s})
621}
622
623// GetDebugFileSink returns the package-wide active sink registered by
624// SetDebugFileSink, or nil when none is registered.

Calls 1

StoreMethod · 0.45