From 9816ccee9d12bb04d4c94c2708d3bbe27a54b2ce Mon Sep 17 00:00:00 2001 From: Paul Tyng Date: Thu, 13 Aug 2020 09:24:49 -0400 Subject: [PATCH] Reduce logging output --- langserver/handlers/service.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/langserver/handlers/service.go b/langserver/handlers/service.go index 8ef9600aa..e5d7640ea 100644 --- a/langserver/handlers/service.go +++ b/langserver/handlers/service.go @@ -78,7 +78,11 @@ func (svc *service) Assigner() (jrpc2.Assigner, error) { tr := newTickReporter(5 * time.Second) tr.AddReporter(func() { - svc.logger.Printf("Root modules waiting to be loaded: %d", svc.modMgr.WorkerQueueSize()) + queueSize := svc.modMgr.WorkerQueueSize() + if queueSize < 1 { + return + } + svc.logger.Printf("Root modules waiting to be loaded: %d", queueSize) }) tr.StartReporting(svc.sessCtx)