MCPcopy Create free account
hub / github.com/PasarGuard/node / emitLogLocked

Method emitLogLocked

backend/wireguard/log.go:47–56  ·  view source on GitHub ↗

emitLogLocked sends to the backend log channel while the caller already holds wg.mu.

(severity logSeverity, message string)

Source from the content-addressed store, hash-verified

45
46// emitLogLocked sends to the backend log channel while the caller already holds wg.mu.
47func (wg *WireGuard) emitLogLocked(severity logSeverity, message string) {
48 if wg.logChan == nil {
49 return
50 }
51
52 select {
53 case wg.logChan <- formatWireGuardLogLine(severity, message):
54 default:
55 }
56}

Callers 2

shutdownLockedMethod · 0.95
emitLogMethod · 0.95

Calls 1

formatWireGuardLogLineFunction · 0.85

Tested by

no test coverage detected