From 47f254f567e85d11b3f39982647d34466965804f Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Mon, 21 Mar 2022 16:43:15 +0100 Subject: [PATCH] StopFlushDaemon: document flushing on shutdown This is how it was originally implemented and people may have started to rely on that now after inspecting the source code. --- klog.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/klog.go b/klog.go index cb04590f..8f5871ad 100644 --- a/klog.go +++ b/klog.go @@ -1077,9 +1077,9 @@ func (f *flushDaemon) isRunning() bool { return f.stopC != nil } -// StopFlushDaemon stops the flush daemon, if running. +// StopFlushDaemon stops the flush daemon, if running, and flushes once. // This prevents klog from leaking goroutines on shutdown. After stopping -// the daemon, you can still manually flush buffers by calling Flush(). +// the daemon, you can still manually flush buffers again by calling Flush(). func StopFlushDaemon() { logging.flushD.stop() }