Add audit log feature

This commit is contained in:
Jakob Borg
2015-04-25 18:21:47 +09:00
parent bb31b1785b
commit 131f2be857
6 changed files with 170 additions and 2 deletions

View File

@@ -163,7 +163,7 @@ func copyStderr(stderr io.ReadCloser, dst io.Writer) {
dst.Write([]byte(line))
if strings.HasPrefix(line, "panic:") || strings.HasPrefix(line, "fatal error:") {
panicFd, err = os.Create(time.Now().Format(locations[locPanicLog]))
panicFd, err = os.Create(timestampedLoc(locPanicLog))
if err != nil {
l.Warnln("Create panic log:", err)
continue