mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-25 19:15:34 +00:00
tstest: do not panic when a panic logs
The panicLogWriter is too strict, and any panics that occur get wrapped up in quotes. This makes it so that it will allow panics to continue writing to Stderr without going through logger.Logf. Updates #cleanup Signed-off-by: Maisem Ali <maisem@tailscale.com>
This commit is contained in:
parent
12a2221db2
commit
075abd8ec1
@ -42,7 +42,7 @@ func (panicLogWriter) Write(b []byte) (int, error) {
|
||||
// interfaces.GetState & tshttpproxy code to allow pushing
|
||||
// down a Logger yet. TODO(bradfitz): do that refactoring once
|
||||
// 1.2.0 is out.
|
||||
if bytes.Contains(b, []byte("tshttpproxy: ")) {
|
||||
if bytes.Contains(b, []byte("tshttpproxy: ")) || bytes.Contains(b, []byte("runtime/panic.go:")) {
|
||||
os.Stderr.Write(b)
|
||||
return len(b), nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user