Pārlūkot izejas kodu

Timestamp the panic log

Jakob Borg 11 gadi atpakaļ
vecāks
revīzija
5537d53f9a
1 mainītis faili ar 1 papildinājumiem un 0 dzēšanām
  1. 1 0
      cmd/syncthing/monitor.go

+ 1 - 0
cmd/syncthing/monitor.go

@@ -126,6 +126,7 @@ func copyStderr(stderr io.ReadCloser) {
 				l.Warnf("Panic detected, writing to \"%s\"", panicFd.Name())
 				l.Warnln("Please create an issue at https://github.com/syncting/syncthing/issues/ with the panic log attached")
 
+				panicFd.WriteString("Panic at " + time.Now().Format(time.RFC1123) + "\n")
 				stdoutMut.Lock()
 				for _, line := range stdoutFirstLines {
 					panicFd.WriteString(line)