mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-11 21:27:31 +00:00
logpolicy: actually collect panics
(Written with Josh) For #2544 Signed-off-by: David Crawshaw <crawshaw@tailscale.com>
This commit is contained in:

committed by
Josh Bleecher Snyder

parent
7298e777d4
commit
3e039daf95
@@ -435,9 +435,12 @@ func New(collection string) *Policy {
|
||||
c.HTTPC = &http.Client{Transport: newLogtailTransport(u.Host)}
|
||||
}
|
||||
|
||||
filchBuf, filchErr := filch.New(filepath.Join(dir, cmdName), filch.Options{})
|
||||
filchBuf, filchErr := filch.New(filepath.Join(dir, cmdName), filch.Options{
|
||||
ReplaceStderr: true,
|
||||
})
|
||||
if filchBuf != nil {
|
||||
c.Buffer = filchBuf
|
||||
c.Stderr = filchBuf.OrigStderr
|
||||
}
|
||||
lw := logtail.NewLogger(c, log.Printf)
|
||||
log.SetFlags(0) // other logflags are set on console, not here
|
||||
|
Reference in New Issue
Block a user