diff --git a/cmd/tailscaled/depaware.txt b/cmd/tailscaled/depaware.txt index 84b6d6f7a..35975d075 100644 --- a/cmd/tailscaled/depaware.txt +++ b/cmd/tailscaled/depaware.txt @@ -87,6 +87,7 @@ tailscale.com/cmd/tailscaled dependencies: (generated by github.com/tailscale/de W tailscale.com/util/endian from tailscale.com/net/netns+ tailscale.com/util/lineread from tailscale.com/control/controlclient+ tailscale.com/util/pidowner from tailscale.com/ipn/ipnserver + tailscale.com/util/racebuild from tailscale.com/logpolicy tailscale.com/version from tailscale.com/cmd/tailscaled+ tailscale.com/version/distro from tailscale.com/control/controlclient+ tailscale.com/wgengine from tailscale.com/cmd/tailscaled+ diff --git a/logpolicy/logpolicy.go b/logpolicy/logpolicy.go index 632cdc1ca..4174a6b4b 100644 --- a/logpolicy/logpolicy.go +++ b/logpolicy/logpolicy.go @@ -35,6 +35,7 @@ "tailscale.com/paths" "tailscale.com/smallzstd" "tailscale.com/types/logger" + "tailscale.com/util/racebuild" "tailscale.com/version" ) @@ -396,7 +397,7 @@ func New(collection string) *Policy { log.Printf("Program starting: v%v, Go %v: %#v", version.Long, - strings.TrimPrefix(runtime.Version(), "go"), + goVersion(), os.Args) log.Printf("LogID: %v", newc.PublicID) if filchErr != nil { @@ -479,3 +480,11 @@ func newLogtailTransport(host string) *http.Transport { return tr } + +func goVersion() string { + v := strings.TrimPrefix(runtime.Version(), "go") + if racebuild.On { + return v + "-race" + } + return v +}