The capturing logger returns its underlying message slice, allowing a caller to modify the recorded message contents.
|
func (l *CapturingLogger) Messages() []string { |
|
return l.hook.Messages() |
|
} |
|
func (h *captureMessageHook) Messages() []string { |
|
h.mu.RLock() |
|
defer h.mu.RUnlock() |
|
|
|
return h.messages |
|
} |
Messages() should return a copy of its message slice.
The capturing logger returns its underlying message slice, allowing a caller to modify the recorded message contents.
platform-lib/pkg/rslog/capturing_logger.go
Lines 129 to 131 in 8cb8e62
platform-lib/pkg/rslog/capturing_logger.go
Lines 143 to 148 in 8cb8e62
Messages()should return a copy of its message slice.