mirror of
https://github.com/tailscale/tailscale.git
synced 2025-07-29 15:23:45 +00:00
types/logger, logpolicy: disable rate limiting, don't upload on Plan 9
To ease local debugging and have fewer moving pieces while bringing up Plan 9 support. Updates #5794 Change-Id: I2dc98e73bbb0d4d4730dc47203efc0550a0ac0a0 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
parent
3da1728207
commit
da8e8eb86f
@ -627,7 +627,7 @@ func (opts Options) New() *Policy {
|
||||
conf.IncludeProcSequence = true
|
||||
}
|
||||
|
||||
if envknob.NoLogsNoSupport() || testenv.InTest() {
|
||||
if envknob.NoLogsNoSupport() || testenv.InTest() || runtime.GOOS == "plan9" {
|
||||
opts.Logf("You have disabled logging. Tailscale will not be able to provide support.")
|
||||
conf.HTTPC = &http.Client{Transport: noopPretendSuccessTransport{}}
|
||||
} else {
|
||||
|
@ -14,6 +14,7 @@ import (
|
||||
"fmt"
|
||||
"io"
|
||||
"log"
|
||||
"runtime"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
@ -162,6 +163,10 @@ func RateLimitedFnWithClock(logf Logf, f time.Duration, burst int, maxCache int,
|
||||
if envknob.String("TS_DEBUG_LOG_RATE") == "all" {
|
||||
return logf
|
||||
}
|
||||
if runtime.GOOS == "plan9" {
|
||||
// To ease bring-up.
|
||||
return logf
|
||||
}
|
||||
var (
|
||||
mu sync.Mutex
|
||||
msgLim = make(map[string]*limitData) // keyed by logf format
|
||||
|
Loading…
x
Reference in New Issue
Block a user