Events: convert from hclog to events (#1409)

This commit is contained in:
Jim authored and GitHub committed 2021-07-28 06:31:16 -04:00
1 parent ade67e6bb5
commit 70ad081e39
46 files changed
+1188 -595

No files matched your search

+3 -1
View File
@@ -1,6 +1,7 @@
package dev
import (
"context"
"errors"
"fmt"
"net"
@@ -316,6 +317,7 @@ func (c *Command) AutocompleteFlags() complete.Flags {
}
func (c *Command) Run(args []string) int {
const op = "dev.(Command).Run"
c.CombineLogs = c.flagCombineLogs
var err error
@@ -641,7 +643,7 @@ func (c *Command) Run(args []string) int {
case <-c.SigUSR2Ch:
buf := make([]byte, 32*1024*1024)
n := runtime.Stack(buf[:], true)
c.Logger.Info("goroutine trace", "stack", string(buf[:n]))
event.WriteSysEvent(context.TODO(), op, "goroutine trace", "stack", string(buf[:n]))
}
}