1
0
mirror of https://github.com/golang/go synced 2024-11-18 12:14:42 -07:00
go/internal/lsp/debug
Rob Findley f2c07d7d8e internal/lsp/lsprpc: improvements to daemon logging
The gopls daemon had different default logging behavior than the sidecar
gopls: by default, the daemon was started with -logfile=auto.
Additionally, because most logs are reflected back to the forwarder, the
actual daemon logs have very little (if any) information.

This means that if you simply start gopls with -remote=auto, you'll get
a single logfile named /tmp/gopls-<pid>.log, which is mostly empty. This
is not a delightful experience.

Fix this via several improvements:
 + Log lifecycle events in the Daemon, to give the log a purpose.
 + Give the daemon a new default log location:
   /tmp/gopls-daemon-<pid>.log.
 + Don't pass -logfile=auto to the daemon by default.

Fixes golang/go#40105

Change-Id: I5e91ea98b4968c512bce76a596bbae441f461a66
Reviewed-on: https://go-review.googlesource.com/c/tools/+/241440
Run-TryBot: Robert Findley <rfindley@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2020-07-16 19:33:22 +00:00
..
tag internal/lsp: decouple client and server debug 2020-06-11 13:49:48 +00:00
info.1.11.go internal/lsp/debug: add newlines to debug messages 2019-06-12 17:36:44 +00:00
info.1.12.go internal/lsp/debug: add newlines to debug messages 2019-06-12 17:36:44 +00:00
info.go internal/lsp/cache: add concurrency error check for go cmds 2020-04-08 03:22:09 +00:00
metrics.go internal/event: move event/core.Tag to event/label.Label 2020-04-23 18:13:33 +00:00
rpc.go internal/event: remove the event.eventType type 2020-04-27 15:30:19 +00:00
serve.go internal/lsp/lsprpc: improvements to daemon logging 2020-07-16 19:33:22 +00:00
trace.go internal/event: remove the event.eventType type 2020-04-27 15:30:19 +00:00